public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/15366] New: Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS
@ 2013-04-13  0:32 richard at metafoo dot co.uk
  2013-04-13  1:25 ` [Bug libc/15366] " ppluzhnikov at google dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: richard at metafoo dot co.uk @ 2013-04-13  0:32 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=15366

             Bug #: 15366
           Summary: Per C11 and C++11, <stdint.h> should not look at
                    __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: richard@metafoo.co.uk
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


glibc's <stdint.h> follows C99, which says that in C++, certain macros should
only be defined if __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS is defined.
However, the C++ committee decided that they didn't want this behavior, and
explicitly overruled this in the C++11 standard (the first to provide
<stdint.h>). Consequently C11 removed these rules. glibc has not been updated
to follow the C11 rules, and still checks for those macros being defined in C++
mode.

C++ implementations are currently working around this by wrapping glibc's
<stdint.h> with one which defines these macros first. These workarounds should
not be necessary; glibc should simply not be checking for these macros. Fix
would be to remove these lines from sysdeps/generic/stdint.h:

/* The ISO C99 standard specifies that in C++ implementations these
   macros should only be defined if explicitly requested.  */
#if !defined __cplusplus || defined __STDC_LIMIT_MACROS

... plus the corresponding #endif and the corresponding lines for
__STDC_CONSTANT_MACROS.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libc/15366] Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS
  2013-04-13  0:32 [Bug libc/15366] New: Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS richard at metafoo dot co.uk
@ 2013-04-13  1:25 ` ppluzhnikov at google dot com
  2013-04-15 22:58 ` ppluzhnikov at google dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ppluzhnikov at google dot com @ 2013-04-13  1:25 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=15366

Paul Pluzhnikov <ppluzhnikov at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppluzhnikov at google dot
                   |                            |com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libc/15366] Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS
  2013-04-13  0:32 [Bug libc/15366] New: Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS richard at metafoo dot co.uk
  2013-04-13  1:25 ` [Bug libc/15366] " ppluzhnikov at google dot com
@ 2013-04-15 22:58 ` ppluzhnikov at google dot com
  2013-04-15 23:32 ` ppluzhnikov at google dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ppluzhnikov at google dot com @ 2013-04-15 22:58 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=15366

Paul Pluzhnikov <ppluzhnikov at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at sourceware    |ppluzhnikov at google dot
                   |dot org                     |com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libc/15366] Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS
  2013-04-13  0:32 [Bug libc/15366] New: Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS richard at metafoo dot co.uk
  2013-04-13  1:25 ` [Bug libc/15366] " ppluzhnikov at google dot com
  2013-04-15 22:58 ` ppluzhnikov at google dot com
@ 2013-04-15 23:32 ` ppluzhnikov at google dot com
  2013-05-21 14:17 ` ondra at iuuk dot mff.cuni.cz
  2014-06-13 18:26 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ppluzhnikov at google dot com @ 2013-04-15 23:32 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=15366

--- Comment #1 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2013-04-15 23:32:47 UTC ---
Google ref: b/8607032
Proposed patch: http://sourceware.org/ml/libc-alpha/2013-04/msg00473.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libc/15366] Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS
  2013-04-13  0:32 [Bug libc/15366] New: Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS richard at metafoo dot co.uk
                   ` (2 preceding siblings ...)
  2013-04-15 23:32 ` ppluzhnikov at google dot com
@ 2013-05-21 14:17 ` ondra at iuuk dot mff.cuni.cz
  2014-06-13 18:26 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ondra at iuuk dot mff.cuni.cz @ 2013-05-21 14:17 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=15366

OndrejBilka <ondra at iuuk dot mff.cuni.cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |ondra at iuuk dot
                   |                            |mff.cuni.cz
         Resolution|                            |FIXED

--- Comment #2 from OndrejBilka <ondra at iuuk dot mff.cuni.cz> 2013-05-21 14:17:33 UTC ---
Was according to http://sourceware.org/ml/libc-alpha/2013-04/msg00677.html
commited.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libc/15366] Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS
  2013-04-13  0:32 [Bug libc/15366] New: Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS richard at metafoo dot co.uk
                   ` (3 preceding siblings ...)
  2013-05-21 14:17 ` ondra at iuuk dot mff.cuni.cz
@ 2014-06-13 18:26 ` fweimer at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 18:26 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=15366

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-13 18:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-13  0:32 [Bug libc/15366] New: Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS richard at metafoo dot co.uk
2013-04-13  1:25 ` [Bug libc/15366] " ppluzhnikov at google dot com
2013-04-15 22:58 ` ppluzhnikov at google dot com
2013-04-15 23:32 ` ppluzhnikov at google dot com
2013-05-21 14:17 ` ondra at iuuk dot mff.cuni.cz
2014-06-13 18:26 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).