public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/10110] New: Separate __STDC_* predefines from features.h
@ 2009-04-28 15:17 jsm28 at gcc dot gnu dot org
2009-04-28 15:18 ` [Bug libc/10110] " jsm28 at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-04-28 15:17 UTC (permalink / raw)
To: glibc-bugs
To support implementing the C99 requirement that the __STDC_* predefined
macros are constant throughout the translation unit (not undefined before
system headers are included and defined afterwards), glibc should put those
such macros it defines in a standalone header included from <features.h>
that is also suitable for the compiler to preinclude by default.
A glibc patch is at <http://sourceware.org/ml/libc-alpha/2009-04/txt00001.txt>
and I'll also attach it to this PR. Note that this patch is very simple and
it should be clear that it is safe; it's the GCC patch included with the same
message <http://sourceware.org/ml/libc-alpha/2009-04/msg00005.html> that's
the more complicated side of implementing this C99 requirement.
--
Summary: Separate __STDC_* predefines from features.h
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: jsm28 at gcc dot gnu dot org
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10110
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/10110] Separate __STDC_* predefines from features.h
2009-04-28 15:17 [Bug libc/10110] New: Separate __STDC_* predefines from features.h jsm28 at gcc dot gnu dot org
@ 2009-04-28 15:18 ` jsm28 at gcc dot gnu dot org
2009-06-16 15:31 ` drepper at redhat dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-04-28 15:18 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From jsm28 at gcc dot gnu dot org 2009-04-28 15:17 -------
Created an attachment (id=3913)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=3913&action=view)
glibc patch
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10110
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/10110] Separate __STDC_* predefines from features.h
2009-04-28 15:17 [Bug libc/10110] New: Separate __STDC_* predefines from features.h jsm28 at gcc dot gnu dot org
2009-04-28 15:18 ` [Bug libc/10110] " jsm28 at gcc dot gnu dot org
@ 2009-06-16 15:31 ` drepper at redhat dot com
2009-06-16 16:20 ` joseph at codesourcery dot com
2010-06-01 3:58 ` pasky at suse dot cz
3 siblings, 0 replies; 5+ messages in thread
From: drepper at redhat dot com @ 2009-06-16 15:31 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2009-06-16 15:31 -------
I don't like this super-complicated mechanism. Just hardcode the values in gcc
(in the spec file or where else). They must not change anywhere. Then glibc
can be changed to not redefine them if they are already defined.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://sourceware.org/bugzilla/show_bug.cgi?id=10110
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/10110] Separate __STDC_* predefines from features.h
2009-04-28 15:17 [Bug libc/10110] New: Separate __STDC_* predefines from features.h jsm28 at gcc dot gnu dot org
2009-04-28 15:18 ` [Bug libc/10110] " jsm28 at gcc dot gnu dot org
2009-06-16 15:31 ` drepper at redhat dot com
@ 2009-06-16 16:20 ` joseph at codesourcery dot com
2010-06-01 3:58 ` pasky at suse dot cz
3 siblings, 0 replies; 5+ messages in thread
From: joseph at codesourcery dot com @ 2009-06-16 16:20 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From joseph at codesourcery dot com 2009-06-16 16:20 -------
Subject: Re: Separate __STDC_* predefines from features.h
On Tue, 16 Jun 2009, drepper at redhat dot com wrote:
> I don't like this super-complicated mechanism. Just hardcode the values in gcc
> (in the spec file or where else). They must not change anywhere. Then glibc
> can be changed to not redefine them if they are already defined.
GCC could reasonably take responsibility for __STDC_IEC_559__ and
__STDC_IEC_559_COMPLEX__, knowing that glibc implements the library parts
of the requirements, and define a macro to indicate that it has taken
responsibility for these macros. (That would best be a separate macro,
__IEC_559_MACROS_PREDEFINED__ or similar, since options such as
-ffast-math mean the IEEE arithmetic requirements are not being followed
and so these macros shouldn't actually be predefined when certain options
are being used.) But as I noted in the original patch submission this
doesn't work so well for __STDC_ISO_10646__; that *should* change when
glibc is updated for new versions of Unicode; I said:
I strongly suspect that the value of __STDC_ISO_10646__ in glibc is
out of date (the comment says Unicode 3.1 and the value is 200009L,
but there have been subsequent changes updating glibc to Unicode 5).
Updating this (in features.h before this patch or stdc-predef.h after
it) is clearly independent of this patch.
I can implement a fixincludes-based approach, where the GCC build process
extracts the value of __STDC_ISO_10646__ from the installed system headers
(while determining __STDC_IEC_559__ and __STDC_IEC_559_COMPLEX__ directly
based on the options passed to GCC); this would avoid glibc changes being
needed, but make it more important to run the mkheaders script GCC
installs to update the fixed headers when glibc is updated and an existing
GCC installation is not rebuilt. But the preinclusion mechanism in GCC is
still needed for the use the DFP people wish to make of the GCC patch (I
have confirmed they are interested in it), predefining __STDC_DEC_FP__
only when building with -I/usr/include/dfp to get DFP versions of headers
(which include core glibc ones with #include_next); all the complexity
goes in GCC (with some additional complexity to extract values at build
time) and all you avoid is a small glibc patch to put some definitions in
their own header.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10110
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/10110] Separate __STDC_* predefines from features.h
2009-04-28 15:17 [Bug libc/10110] New: Separate __STDC_* predefines from features.h jsm28 at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-06-16 16:20 ` joseph at codesourcery dot com
@ 2010-06-01 3:58 ` pasky at suse dot cz
3 siblings, 0 replies; 5+ messages in thread
From: pasky at suse dot cz @ 2010-06-01 3:58 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From pasky at suse dot cz 2010-06-01 03:58 -------
So this should be now marked as SUSPENDED, waiting for the gcc changes, right?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |SUSPENDED
http://sourceware.org/bugzilla/show_bug.cgi?id=10110
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-01 3:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-28 15:17 [Bug libc/10110] New: Separate __STDC_* predefines from features.h jsm28 at gcc dot gnu dot org
2009-04-28 15:18 ` [Bug libc/10110] " jsm28 at gcc dot gnu dot org
2009-06-16 15:31 ` drepper at redhat dot com
2009-06-16 16:20 ` joseph at codesourcery dot com
2010-06-01 3:58 ` pasky at suse dot cz
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).