This is the mail archive of the 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]
Other format: [Raw text]

Re: RFC: Stricter semantics for renaming pragmas

On Wed, 19 May 2004, Andrew Pinski wrote:

> #pragma redefine_extname is used for -fmudflap now and there was some 
> talk
> about enabling it all the time.

I have a vague idea of using it in glibc along with another feature not
implemented in GCC (a header implicitly included at the start of all
translation units regardless of whether any system headers are included -
also needed for __STDC_ISO_10646__, a library property, to have a correct
constant value provided by libc throughout the translation unit) for
properly correct implementations of C90 and C99.  Various functions such
as scanf and strtod have incompatible specifications in C90 and C99
(because of hex floats), and can be declared by user programs without
including standard headers - so __asm__ on the declarations in standard
headers doesn't suffice to get the correct version.  Nor does a
preincluded header declaring these functions, as such a predeclaration is
wrong (users may redeclare these names as static functions or objects if
they don't include the headers).  But redefine_extname seems to be right
for pointing such functions to the correct (C90/C99) version if they
should happen to be used.

Joseph S. Myers

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