This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix for BZ #15366 (ignore __STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS)
- From: Richard Smith <richardsmith at google dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: Rich Felker <dalias at aerifal dot cx>, Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Date: Mon, 22 Apr 2013 10:25:23 -0700
- Subject: Re: [patch] Fix for BZ #15366 (ignore __STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS)
- References: <ye6qhaj75q8n dot fsf at elbrus2 dot mtv dot corp dot google dot com> <516CFD67 dot 2010009 at redhat dot com> <CALoOobMkrkFtqeNWF7dhEfnYV8=hNUvwKq+X4md=8mDfawd5vA at mail dot gmail dot com> <516D71F0 dot 5090500 at redhat dot com> <20130416160428 dot GY20323 at brightrain dot aerifal dot cx> <CALoOobNcA1T=71fyhfeJi53eqY8Vt83tjOFgGp7=rpopF2nGEg at mail dot gmail dot com>
On Mon, Apr 22, 2013 at 8:37 AM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
>
> On Tue, Apr 16, 2013 at 9:04 AM, Rich Felker <dalias@aerifal.cx> wrote:
>
> > I don't think real-world code was ever a consideration. It was some
> > stupid thing about the C++ committee not wanting them (being allergic
> > to macros?) and the preprocessor conditionals were to satisfy them.
> > Can anyone confirm if this is correct?
>
> Ping?
I'm not sure on the history here, but I don't think the C++ committee
ever wanted the __STDC_WHATEVER_MACROS #defines to do anything -- I
think that was just the C committee trying to predict what the C++
committee would want and guessing wrong (the __STDC_* macro names are
a C convention). Alternatively, it's possible that the C++ committee
changed their minds in the time between the publishing of C99 and of
C++11. If that distinction really matters, I could ask around and see
if anyone on the C++ committee can remember that far back...
In any case, the first version of the C++ standard which includes a
<stdint.h> explicitly says "ignore the C standard, those macros do
nothing in C++, we want everything in <stdint.h>", and C11 took out
the description of these macros (I believe at the request of the C++
committee). I think that makes it clear that including any mention of
these macros in the C standard was just a mistake (now rectified), and
that these macros should never be checked in any revision of C++ (or
C).
--
Richard