ObjC/ObjC++: Tidy up #includes of objc-act.c

Mike Stump mikestump@comcast.net
Wed Dec 1 22:45:00 GMT 2010


On Dec 1, 2010, at 1:53 PM, Nicola Pero wrote:
> This patch tidies up the list of #includes in objc-act.c.  For each file,
> it adds an explanation of why it is included (as far as I could determine).

No other part of the compiler does this...  I'm not strongly opposed, but I just don't see the point either.

> A few other files are implicitly #included by tree.h or c-tree.h etc. and
> I left them, commented out, but with a comment explaining what is happening.

I don't think this should be done.  We include the headers we need, other headers are free, as an implementation detail to include or not the other file.  As they do, we don't want the header to go missing.

> #include "system.h"
> #include "coretypes.h"
> -#include "tm.h"
> #include "tree.h"

Hum, you didn't actually test this did you?

/* Predefine the following data type:                                            
                                                                                 
   struct _objc_exception_data                                                   
   {                                                                             
     int buf[OBJC_JBLEN];                                                        
     void *pointers[4];                                                          
   }; */

/* The following yuckiness should prevent users from having to #include          
   <setjmp.h> in their code... */

/* Define to a harmless positive value so the below code doesn't die.  */
#ifndef OBJC_JBLEN
#define OBJC_JBLEN 18
#endif


and from i386/darwin.h:

/* Size of the Obj-C jump buffer.  */
#define OBJC_JBLEN ((TARGET_64BIT) ? ((9 * 2) + 3 + 16) : (18))

?



More information about the Gcc-patches mailing list