Bug 1318877
Summary: | Per C11 and C++11, <stdint.h> should not look at __STDC_LIMIT_MACROS or __STDC_CONSTANT_MACROS | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Frank Hirtz <fhirtz> | |
Component: | glibc | Assignee: | Martin Sebor <msebor> | |
Status: | CLOSED ERRATA | QA Contact: | Sergey Kolosov <skolosov> | |
Severity: | low | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 7.4 | CC: | ashankar, codonell, cww, fweimer, jakub, law, mcermak, mnewsome, mpolacek, msebor, pfrankli, skolosov | |
Target Milestone: | rc | Keywords: | Patch | |
Target Release: | 7.4 | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: |
Cause: Definitions of certain macros in <stdint.h> were guarded by __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS, requiring the latter macros to be defined by a program in order for the former to be usable, contrary to the C11 and C++11 standards requirements.
Consequence: The guarded macros were not usable unless the latter were defined.
Fix: The guarding macros have been removed, and the macros previously guarded by them have been defined unconditionally.
Result: More programs that strictly conform to the relevant standards are accommodated.
|
Story Points: | --- | |
Clone Of: | ||||
: | 1318878 (view as bug list) | Environment: | ||
Last Closed: | 2017-08-01 18:06:55 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1298243, 1318878, 1390370 |
Description
Frank Hirtz
2016-03-18 03:01:00 UTC
The support for C11 and C++11 is only experimental in the RHEL 7 system compiler and runtimes, and there is no support for it in the RHEL 6 runtimes as far as I know. Developer Toolset provides C11 and C++11 support in RHEL 7 and RHEL6, I'll switch the componet there and ask them for their opinion on how to fix this. It might be that we conclude the changes are low enough risk in RHEL6 that we might change the core runtime headers, but my feeling is that this may be unacceptable as RHEL6 is now in Production Phase 2. The fix will therefore have to be contained entirely in Developer Toolset. The changes are unacceptable from a risk perspective for RHEL6 Production Phase 2. The changes are acceptable for glibc in RHEL7, so we'll look at these for rhel-7.4. This would enable the use of DTS for compiling C11, but not the system compiler. I meant rather than say removing the -/* 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 - stuff change it to: /* 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 || __GNUC_PREREQ (5, 0) or something similar. That should not be that risky even for older RHELs. (In reply to Jakub Jelinek from comment #5) > I meant rather than say removing the > -/* 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 > - > stuff change it to: > /* 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 || __GNUC_PREREQ (5, > 0) > or something similar. That should not be that risky even for older RHELs. That might be workable for older RHEL. Again my worry is that there are people already using gcc 5.x on RHEL6, perhaps their own compiler, and changing glibc would change the behaviour that they are seeing from the core runtimes. In a production phase 2 release like RHEL 6.9 we don't want to change anything that anyone might already be expecting to behave a certain way. While in RHEL 7.3 and 7.4 we have much more tolerance to this kind of change. Upstream: commit 1ef74943ce2f114c78b215af57c2ccc72ccdb0b7 Author: Paul Pluzhnikov <ppluzhnikov> Date: Thu Apr 25 11:08:31 2013 -0700 Get rid of __STDC_FORMAT_MACROS, __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:1916 |