public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/3439] New: math.h, fenv.h macros do not conform to C99
@ 2006-10-31 19:42 eggert at gnu dot org
2006-10-31 19:44 ` [Bug math/3439] " eggert at gnu dot org
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: eggert at gnu dot org @ 2006-10-31 19:42 UTC (permalink / raw)
To: glibc-bugs
In
<https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=index.tpl&source=L&listname=austin-group-l&id=9979>
Geoff Clare reported that the glibc implementations of <math.h> and
<fenv.h> do not conform to C99 or to POSIX, because they define some
macros using techniques that do not work inside #if, but C99 and POSIX
require that the macros work in #if.
I'll attach a patch against glibc head.
--
Summary: math.h, fenv.h macros do not conform to C99
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: math
AssignedTo: aj at suse dot de
ReportedBy: eggert at gnu dot org
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=3439
------- 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] 12+ messages in thread
* [Bug math/3439] math.h, fenv.h macros do not conform to C99
2006-10-31 19:42 [Bug math/3439] New: math.h, fenv.h macros do not conform to C99 eggert at gnu dot org
@ 2006-10-31 19:44 ` eggert at gnu dot org
2006-11-10 16:24 ` drepper at redhat dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: eggert at gnu dot org @ 2006-10-31 19:44 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From eggert at gnu dot org 2006-10-31 19:43 -------
Created an attachment (id=1395)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=1395&action=view)
fix math.h, fenv.h macros to be usable in #if
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3439
------- 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] 12+ messages in thread
* [Bug math/3439] math.h, fenv.h macros do not conform to C99
2006-10-31 19:42 [Bug math/3439] New: math.h, fenv.h macros do not conform to C99 eggert at gnu dot org
2006-10-31 19:44 ` [Bug math/3439] " eggert at gnu dot org
@ 2006-11-10 16:24 ` drepper at redhat dot com
2006-11-11 1:01 ` eggert at gnu dot org
2007-02-17 8:59 ` drepper at redhat dot com
3 siblings, 0 replies; 12+ messages in thread
From: drepper at redhat dot com @ 2006-11-10 16:24 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2006-11-10 16:24 -------
I don't want to change this. It's a pointless requirement which just makes it
harder to debug programs since the macros might not be available in the debug info.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3439
------- 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] 12+ messages in thread
* [Bug math/3439] math.h, fenv.h macros do not conform to C99
2006-10-31 19:42 [Bug math/3439] New: math.h, fenv.h macros do not conform to C99 eggert at gnu dot org
2006-10-31 19:44 ` [Bug math/3439] " eggert at gnu dot org
2006-11-10 16:24 ` drepper at redhat dot com
@ 2006-11-11 1:01 ` eggert at gnu dot org
2007-02-17 8:59 ` drepper at redhat dot com
3 siblings, 0 replies; 12+ messages in thread
From: eggert at gnu dot org @ 2006-11-11 1:01 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From eggert at gnu dot org 2006-11-11 01:01 -------
Created an attachment (id=1411)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=1411&action=view)
fix math.h, fenv.h macros to be usable in #if (without removing enums)
Here is a revised patch. This keeps the enums, so ordinary gcc -g compiles
will have the names in the debug symbol table. This should overcome the
objection to the original patch.
--
What |Removed |Added
----------------------------------------------------------------------------
Attachment #1395 is|0 |1
obsolete| |
http://sourceware.org/bugzilla/show_bug.cgi?id=3439
------- 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] 12+ messages in thread
* [Bug math/3439] math.h, fenv.h macros do not conform to C99
2006-10-31 19:42 [Bug math/3439] New: math.h, fenv.h macros do not conform to C99 eggert at gnu dot org
` (2 preceding siblings ...)
2006-11-11 1:01 ` eggert at gnu dot org
@ 2007-02-17 8:59 ` drepper at redhat dot com
3 siblings, 0 replies; 12+ messages in thread
From: drepper at redhat dot com @ 2007-02-17 8:59 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2007-02-17 08:59 -------
That is just calling for trouble. The requirement is unnecessary and most
probably just an oversight. It makes no sense to have these as macros. The
best way is to change the requirement in the spec so that this desease isn't
spreading further.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
http://sourceware.org/bugzilla/show_bug.cgi?id=3439
------- 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] 12+ messages in thread
[parent not found: <bug-3439-131@http.sourceware.org/bugzilla/>]
* [Bug math/3439] math.h, fenv.h macros do not conform to C99
[not found] <bug-3439-131@http.sourceware.org/bugzilla/>
@ 2012-04-27 10:48 ` jsm28 at gcc dot gnu.org
2012-04-27 11:23 ` aj at suse dot de
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-04-27 10:48 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=3439
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WONTFIX |
AssignedTo|aj at suse dot de |unassigned at sourceware
| |dot org
--- Comment #5 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-04-27 10:47:50 UTC ---
Reopening. We discussed this on #glibc last night. We want a fix that avoids
duplicating the numeric value of each macro; that is, something along the lines
of (inside the enum):
#define __FE_WHATEVER 0x100
FE_WHATEVER = __FE_WHATEVER,
#define FE_WHATEVER __FE_WHATEVER
--
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] 12+ messages in thread
* [Bug math/3439] math.h, fenv.h macros do not conform to C99
[not found] <bug-3439-131@http.sourceware.org/bugzilla/>
2012-04-27 10:48 ` jsm28 at gcc dot gnu.org
@ 2012-04-27 11:23 ` aj at suse dot de
2012-04-27 11:41 ` aj at suse dot de
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: aj at suse dot de @ 2012-04-27 11:23 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=3439
Andreas Jaeger <aj at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aj at suse dot de
--- Comment #6 from Andreas Jaeger <aj at suse dot de> 2012-04-27 11:23:09 UTC ---
Check <bits/confname.h> as well, it does the enum like:
_PC_MAX_CANON,
#define _PC_MAX_CANON _PC_MAX_CANON
this should work similar for fenv.h
--
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] 12+ messages in thread
* [Bug math/3439] math.h, fenv.h macros do not conform to C99
[not found] <bug-3439-131@http.sourceware.org/bugzilla/>
2012-04-27 10:48 ` jsm28 at gcc dot gnu.org
2012-04-27 11:23 ` aj at suse dot de
@ 2012-04-27 11:41 ` aj at suse dot de
2012-04-28 23:16 ` eggert at gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: aj at suse dot de @ 2012-04-27 11:41 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=3439
--- Comment #7 from Andreas Jaeger <aj at suse dot de> 2012-04-27 11:41:30 UTC ---
ignore my last comment, I see the difference...
--
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] 12+ messages in thread
* [Bug math/3439] math.h, fenv.h macros do not conform to C99
[not found] <bug-3439-131@http.sourceware.org/bugzilla/>
` (2 preceding siblings ...)
2012-04-27 11:41 ` aj at suse dot de
@ 2012-04-28 23:16 ` eggert at gnu dot org
2012-04-29 0:13 ` joseph at codesourcery dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: eggert at gnu dot org @ 2012-04-28 23:16 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=3439
--- Comment #8 from Paul Eggert <eggert at gnu dot org> 2012-04-28 23:15:42 UTC ---
How about this instead?
FE_WHATEVER =
#define FE_WHATEVER 0x100
FE_WHATEVER,
This repeats the number just once and the identifier just thrice,
with no need for __FE_WHATEVER. It's odd, but I've seen odder.
--
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] 12+ messages in thread
* [Bug math/3439] math.h, fenv.h macros do not conform to C99
[not found] <bug-3439-131@http.sourceware.org/bugzilla/>
` (3 preceding siblings ...)
2012-04-28 23:16 ` eggert at gnu dot org
@ 2012-04-29 0:13 ` joseph at codesourcery dot com
2012-11-02 22:15 ` jsm28 at gcc dot gnu.org
2012-11-03 17:10 ` jsm28 at gcc dot gnu.org
6 siblings, 0 replies; 12+ messages in thread
From: joseph at codesourcery dot com @ 2012-04-29 0:13 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=3439
--- Comment #9 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-04-29 00:12:48 UTC ---
I think that would be fine as well.
--
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] 12+ messages in thread
* [Bug math/3439] math.h, fenv.h macros do not conform to C99
[not found] <bug-3439-131@http.sourceware.org/bugzilla/>
` (4 preceding siblings ...)
2012-04-29 0:13 ` joseph at codesourcery dot com
@ 2012-11-02 22:15 ` jsm28 at gcc dot gnu.org
2012-11-03 17:10 ` jsm28 at gcc dot gnu.org
6 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-11-02 22:15 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=3439
--- Comment #10 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-11-02 22:15:11 UTC ---
math.h fixed, following the approach suggested in comment 8, by:
commit 0155d5b26e32b2012d9f1842c3b06324746d3087
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Nov 2 22:11:21 2012 +0000
Make math.h FP_* macros usable in #if (bug 3439).
fenv.h still needs fixing.
--
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] 12+ messages in thread
* [Bug math/3439] math.h, fenv.h macros do not conform to C99
[not found] <bug-3439-131@http.sourceware.org/bugzilla/>
` (5 preceding siblings ...)
2012-11-02 22:15 ` jsm28 at gcc dot gnu.org
@ 2012-11-03 17:10 ` jsm28 at gcc dot gnu.org
6 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-11-03 17:10 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=3439
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #11 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-11-03 17:09:45 UTC ---
fenv.h fixed for 2.17 by:
commit fbeafedeea37e0af1984a6511018d159f5ceed6a
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat Nov 3 17:07:56 2012 +0000
Make fenv.h FE_* macros usable in #if (bug 3439).
--
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] 12+ messages in thread
end of thread, other threads:[~2012-11-03 17:10 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-31 19:42 [Bug math/3439] New: math.h, fenv.h macros do not conform to C99 eggert at gnu dot org
2006-10-31 19:44 ` [Bug math/3439] " eggert at gnu dot org
2006-11-10 16:24 ` drepper at redhat dot com
2006-11-11 1:01 ` eggert at gnu dot org
2007-02-17 8:59 ` drepper at redhat dot com
[not found] <bug-3439-131@http.sourceware.org/bugzilla/>
2012-04-27 10:48 ` jsm28 at gcc dot gnu.org
2012-04-27 11:23 ` aj at suse dot de
2012-04-27 11:41 ` aj at suse dot de
2012-04-28 23:16 ` eggert at gnu dot org
2012-04-29 0:13 ` joseph at codesourcery dot com
2012-11-02 22:15 ` jsm28 at gcc dot gnu.org
2012-11-03 17:10 ` jsm28 at gcc dot gnu.org
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).