This is the mail archive of the gcc@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: GCC's statement expression extension


 > From: Mark Mitchell <mark@codesourcery.com>
 > 
 > >>>>> "Kaveh" == Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:
 > 
 >     Kaveh> Mark,
 > 
 >     Kaveh> 	As I see it, you're only proposing removing stmt exprs
 >     Kaveh> from G++.  The blocking factor is glibc's use of them in
 >     Kaveh> headers to optimize things like the string functions.  I
 >     Kaveh> don't have access to my linux box at the
 > 
 > Oh, no!  Your access went away right in the middle of that sentence!

:-)  Sorry.

I was going to say...

I don't have access to my linux box at the moment, but IIRC don't the
glibc headers have a way, via a cpp macro or something, to turn off
use of the replacement string macros that use stmt exprs and back down
to function calls?  (__NO_STRING_INLINES?)

If so, we can just teach g++ to always pass -D__NO_STRING_INLINES to
cpp to make sure the appropriate magic happens to turn off these stmt
expr using macros and then you can safely take out stmt exprs from
G++.

I don't know if all stmt exprs were protected using wrappers macros
though.  E.g. I don't think strdupa() was macro wrapped.

	 Anyway, just a thought...

		--Kaveh
--
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]