File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -3948,6 +3948,8 @@ bool Compiler<Emitter>::VisitRecoveryExpr(const RecoveryExpr *E) {
39483948template <class Emitter >
39493949bool Compiler<Emitter>::VisitAddrLabelExpr(const AddrLabelExpr *E) {
39503950 assert (E->getType ()->isVoidPointerType ());
3951+ if (DiscardResult)
3952+ return true ;
39513953
39523954 return this ->emitDummyPtr (E, E);
39533955}
Original file line number Diff line number Diff line change @@ -370,3 +370,12 @@ namespace GH150709 {
370370 static_assert ((e2 [0 ].*mp)() == 1 , " " ); // ref-error {{constant expression}}
371371 static_assert ((g.*mp)() == 1 , " " ); // ref-error {{constant expression}}
372372}
373+
374+ namespace DiscardedAddrLabel {
375+ void foo (void ) {
376+ L:
377+ *&&L; // both-error {{indirection not permitted}} \
378+ // both-warning {{expression result unused}}
379+ }
380+ }
381+
You can’t perform that action at this time.
0 commit comments