This is the mail archive of the gcc-bugs@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]

[Bug c++/16002] [3.4/3.5 regression] Strange error message with new parser


------- Additional Comments From giovannibajo at libero dot it  2004-06-16 10:16 -------
Not so easy, though. The parser tries several different constructs that can 
happen at statement level (function declaration, variable declaration, etc.). 
They are all equally possible, and they all fail at different tokens. So the 
error "expected primary expression before XXX", it actually means "starting 
from XXX, I could not find a valid primary expression". 

In this case, I think we should consider the variable declaration to be OK even 
without ';' so that we emit a missing semicolon error, and then skip all the 
token till the end of the line.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16002


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