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: [PATCH] fix Objective-C, further improve error recovery for unknown type names


Hi Mike,

On 14 Nov 2010, at 05:37, Mike Stump wrote:

On Nov 13, 2010, at 1:27 PM, IainS <developer@sandoe- acoustics.co.uk> wrote:
indeed, we should not be doing that....
... clang is the de-facto 'standard'  I guess ...

Yes, but we don't really want to be bug compatible with them, if we think they got it wrong. One can always file a bug report against clang, if they want to know for sure.

In this instance, it seems to me that clang is doing it right ...


Nicola's example:

int in = 0;

for (in = in + 1; in < 10; in++)
 printf ("%d\n", in);

I would expect that to compile properly for both 'c' and 'objc' --
-- unless somewhere there is a statement that 'in' is a reserved word in that context.


(in which case we could file a bug against clang because it allows it,
OSX's gcc-4.2.1 fails - but _not_ with an error that says 'wrong use of keyword' or similar).


what do you think is the proper behavior?
cheers,
Iain



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