public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/3440] New: locale.h macros like LC_ALL are not usable in #if
@ 2006-10-31 20:08 eggert at gnu dot org
  2006-10-31 20:09 ` [Bug libc/3440] " eggert at gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: eggert at gnu dot org @ 2006-10-31 20:08 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 some conformance issues with glibc headers that
define some macros using techniques that do not work inside #if, even
though C99 and POSIX require that the macros work in #if.  I recently
reported some of them against the math component (glibc bug 3439).
locale.h has some issues too, though, with macros like LC_ALL.

I'll attach an (untested but obvious) patch against glibc head.

-- 
           Summary: locale.h macros like LC_ALL are not usable in #if
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: eggert at gnu dot org
                CC: glibc-bugs at sources dot redhat dot com


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

------- 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] 7+ messages in thread

* [Bug libc/3440] locale.h macros like LC_ALL are not usable in #if
  2006-10-31 20:08 [Bug libc/3440] New: locale.h macros like LC_ALL are not usable in #if eggert at gnu dot org
@ 2006-10-31 20:09 ` eggert at gnu dot org
  2006-11-10 16:24 ` drepper at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: eggert at gnu dot org @ 2006-10-31 20:09 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From eggert at gnu dot org  2006-10-31 20:09 -------
Created an attachment (id=1396)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1396&action=view)
patch for LC_ALL etc. to be usable in #if


-- 


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

------- 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] 7+ messages in thread

* [Bug libc/3440] locale.h macros like LC_ALL are not usable in #if
  2006-10-31 20:08 [Bug libc/3440] New: locale.h macros like LC_ALL are not usable in #if eggert at gnu dot org
  2006-10-31 20:09 ` [Bug libc/3440] " eggert at gnu dot org
@ 2006-11-10 16:24 ` drepper at redhat dot com
  2006-11-10 19:06 ` eggert at gnu dot org
  2007-02-17  8:59 ` drepper at redhat dot com
  3 siblings, 0 replies; 7+ 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=3440

------- 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] 7+ messages in thread

* [Bug libc/3440] locale.h macros like LC_ALL are not usable in #if
  2006-10-31 20:08 [Bug libc/3440] New: locale.h macros like LC_ALL are not usable in #if eggert at gnu dot org
  2006-10-31 20:09 ` [Bug libc/3440] " eggert at gnu dot org
  2006-11-10 16:24 ` drepper at redhat dot com
@ 2006-11-10 19:06 ` eggert at gnu dot org
  2007-02-17  8:59 ` drepper at redhat dot com
  3 siblings, 0 replies; 7+ messages in thread
From: eggert at gnu dot org @ 2006-11-10 19:06 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From eggert at gnu dot org  2006-11-10 19:06 -------
But this patch does not make it harder to debug programs, since it is already
the case that macros like LC_ALL are typically unavailable in the debug info.
<locale.h> has "#define LC_ALL __LC_ALL", and unless you use something like
gcc -g3, gdb won't see the LC_ALL.

If you like, I can rework the patch so that macros like __LC_ALL are
available in the debug info, but I doubt whether any normal users would
care so I don't see the point.

A better possibility is to rework this patch so that LC_ALL is typically
available in the debug info, while still conforming to C99 and POSIX.
This would require changing locale.h as well.  I can submit that patch
if you prefer.

(The patches for math.h and fenv.h -- bug 3439 -- are in a different category;
I'll look at them a bit later.)

-- 


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

------- 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] 7+ messages in thread

* [Bug libc/3440] locale.h macros like LC_ALL are not usable in #if
  2006-10-31 20:08 [Bug libc/3440] New: locale.h macros like LC_ALL are not usable in #if eggert at gnu dot org
                   ` (2 preceding siblings ...)
  2006-11-10 19:06 ` eggert at gnu dot org
@ 2007-02-17  8:59 ` drepper at redhat dot com
  3 siblings, 0 replies; 7+ 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 -------
More of this macro nonsense.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


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

------- 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] 7+ messages in thread

* [Bug libc/3440] locale.h macros like LC_ALL are not usable in #if
       [not found] <bug-3440-131@http.sourceware.org/bugzilla/>
  2012-04-27 10:50 ` jsm28 at gcc dot gnu.org
@ 2012-05-10 12:42 ` jsm28 at gcc dot gnu.org
  1 sibling, 0 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-05-10 12:42 UTC (permalink / raw)
  To: glibc-bugs

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

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-05-10 12:41:52 UTC ---
Fixed by:

commit 02467e1ca1745158c99c9b2576b05850028394f7
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Thu May 10 12:38:09 2012 +0000

    [PATCH] [BZ #3440] Make LC_ALL etc. useful in #if expressions.

-- 
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] 7+ messages in thread

* [Bug libc/3440] locale.h macros like LC_ALL are not usable in #if
       [not found] <bug-3440-131@http.sourceware.org/bugzilla/>
@ 2012-04-27 10:50 ` jsm28 at gcc dot gnu.org
  2012-05-10 12:42 ` jsm28 at gcc dot gnu.org
  1 sibling, 0 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-04-27 10:50 UTC (permalink / raw)
  To: glibc-bugs

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

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |
         AssignedTo|drepper.fsp at gmail dot    |unassigned at sourceware
                   |com                         |dot org

--- Comment #5 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-04-27 10:50:20 UTC ---
Reopening.  We discussed this general issue on #glibc last night.  Paul, could
you update your patch for current glibc and send it to libc-alpha for review?

(Note: I have not checked if any standard C headers other than those mentioned
in this bug and bug 3439 are affected by similar issues.  And I have not
checked if POSIX has the same requirement for integer constant expression
macros in POSIX headers, or what bugs there might be in POSIX headers if so.)

-- 
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] 7+ messages in thread

end of thread, other threads:[~2012-05-10 12:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-31 20:08 [Bug libc/3440] New: locale.h macros like LC_ALL are not usable in #if eggert at gnu dot org
2006-10-31 20:09 ` [Bug libc/3440] " eggert at gnu dot org
2006-11-10 16:24 ` drepper at redhat dot com
2006-11-10 19:06 ` eggert at gnu dot org
2007-02-17  8:59 ` drepper at redhat dot com
     [not found] <bug-3440-131@http.sourceware.org/bugzilla/>
2012-04-27 10:50 ` jsm28 at gcc dot gnu.org
2012-05-10 12:42 ` 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).