This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [patch] Fix for BZ #15366 (ignore __STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS)


I've done a little more digging. The text was added to C here (I can
find no indication that they liaised with the C++ committee before
adding it):

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n851.htm

and it was removed as an *editorial* change here:

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1426.pdf

"Removed the C++ feature test macros from 7.8.1, 7.19.2, 7.19.3, and
7.19.4 since C++ has never
used them"

On Mon, Apr 22, 2013 at 10:25 AM, Richard Smith <richardsmith@google.com> wrote:
> 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


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