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]

Re: Fix for PR objc/47232 ("Confusing ObjC error message "attributes may not be specifie d before before ‘class’")



which is hard to read and jumps out as convoluted if not wrong because of the
repeated 'before'. This patch changes it to read


error: unexpected attribute before 'class'

which is consistent with the rest of the parser errors, and is more readable
(if anyone has better suggestions, let me know!). ;-)

attributes not permitted ? I'd prefer a proper sentence... but... Your proposition is also OK ;-)

I proposed 'unexpected attribute' because it is consistent with the other errors, such as 'expected identifier', 'unknown type name' etc.
It also works no matter if you add "before 'class'" after it or not. ;-)


But I actually like sentences, like you do, and agree that a more explanatory sentence would be better. But maybe all error messages
should be changed in sync then ?


Thanks


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