[patch] Fix for BZ #15366 (ignore __STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS)
Richard Smith
richardsmith@google.com
Mon Apr 22 21:54:00 GMT 2013
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
More information about the Libc-alpha
mailing list