ANSIfy cp/parser.c

Kai Henningsen kaih@khms.westfalen.de
Sat Jan 11 22:02:00 GMT 2003


jsm28@cam.ac.uk (Joseph S. Myers)  wrote on 10.01.03 in <Pine.LNX.4.33.0301101929270.16702-100000@kern.srcf.societies.cam.ac.uk>:

> between C and ObjC (are there any programs that are valid C and ObjC but
> have different meanings in the two languages?) but you'd need some way for

The way I understand it, every C program should also be an Objective C  
program with the same meaning, possibly unless you try some weird tricks  
with symbol pasting.

However, if you include one of the basic libobjc headers, you'll  
immediately hit conditional compilation (for example, id will come out as  
a different type for C or Objective C), and of course once you hit actual  
Objective C syntax there's no longer valid C.

So, if you (for example) created a PCH with just Posix headers, that might  
work.

MfG Kai



More information about the Gcc-patches mailing list