This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ Patch] PR 60376


Hi,

in this -std=c++1y regression we ICE on invalid code during error recovery:

60376.C: In function ‘void bar()’:
60376.C:8:9: error: expected nested-name-specifier before ‘(’ token
using (A().foo);
^
60376.C:8:9: error: expected unqualified-id before ‘(’ token
60376.C:8:9: error: expected ‘;’ before ‘(’ token
60376.C:8:18: error: statement cannot resolve address of overloaded function
using (A().foo);
^
60376.C:8:9: internal compiler error: ...

I think we can take the occasion to handle the issue early, in the parser, thus cleaning up the diagnostic we emit in such cases, that is, emit only the first error message (to achieve that I used the same approach already used elsewhere: detect the hard error condition and skip). Tested x86_64-linux.

Thanks,
Paolo.

PS: Submitter posted also an ICE on valid issue, which seems separate to me.

/////////////////////

Attachment: CL_60376
Description: Text document

Attachment: patch_60376
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]