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]

Re: Patch to add __builtin_printf -> fputs transformations


 > From: Bruce Korb <bkorb@cruzio.com>
 > 
 > "Joseph S. Myers" wrote:
 > > In general, when wrapping <stdio.h> you need to be very careful about not
 > > interfering with glibc's __need_FILE.  That is, any wrapper applied to
 > > glibc's <stdio.h> must _not_ have multiple-include protection, since if it
 > > does, one header includes <stdio.h> with __need_FILE defined and then if
 > > the program has a later direct include of <stdio.h> that doesn't work if a
 > > wrapper prevents reinclusion.
 > 
 > Well, then never mind.  If glibc has forced stdio.h to not be wrapable,
 > then you cannot do that for glibc's stdio.h.  In fact, it is probably
 > necessary to verify  that  fixincludes cannot wrap the thing.  Yuck.

BTW, stdio-opt.h is itself self-exclusionary, so at worst you'll have
an extra nanosecond of cpp time, but cc1 won't see the code twice.
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions

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