This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

Re: glibc 2.1.1pre2 breaks libstdc++-v3 build


On Thu, Jan 11, 2001 at 02:03:40PM -0800, Ulrich Drepper wrote:
> "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
> > As I mentioned in my last message, you can capture the definition of a
> > macro inside an inline function:
> 
> No, you cannot.  A macro definition can vary in different compilation
> runs.

I hate to disagree with Ulrich, but ... yes you can.  Note that he
said "inline".  The different compilation runs would get different 
definitions of the inline function -- technically "undefined behavior", 
but we, as the implementor, can define the behavior. 

What can't be captured in an inline function is non-standard 
hyper-extended gcc macros that expand differently depending on 
their use context (e.g. arguments).  If you know something about 
the macros' definitions you can often get the same (or better) 
results with template specializations, but we're not talking 
about such cases here.

Nathan Myers
ncm at cantrip dot org

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