public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/11315] New: bootstrap error with math.h after fixes 5200-01
@ 2003-06-24 22:00 kminola at eng dot umd dot edu
  2003-07-16 17:13 ` [Bug bootstrap/11315] " dje at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: kminola at eng dot umd dot edu @ 2003-06-24 22:00 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11315

           Summary: bootstrap error with math.h after fixes 5200-01
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kminola at eng dot umd dot edu
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-ibm-aix5.2.0.0
  GCC host triplet: powerpc-ibm-aix5.2.0.0
GCC target triplet: powerpc-ibm-aix5.2.0.0

After install of AIX 5.2 maintenance fixes (5200-01), gcc-3.3 no longer
bootstraps.  (gcc-3.3 did bootstrap on AIX 5.2 before fixes installed.)

Bootstrap error is 

stage1/xgcc -Bstage1/ -B/usr/local/powerpc-ibm-aix5.2.0.0/bin/ -c   -g -O2
-DIN_GC
C   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wtraditiona
l -pedantic -Wno-long-long   -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -I.
-I../../g
cc-3.3/gcc -I../../gcc-3.3/gcc/. -I../../gcc-3.3/gcc/config
-I../../gcc-3.3/gcc/..
/include ../../gcc-3.3/gcc/genautomata.c -o genautomata.o
In file included from ../../gcc-3.3/gcc/genautomata.c:109:
include/math.h:1071:2: '#' is not followed by a macro parameter
In file included from ../../gcc-3.3/gcc/genautomata.c:109:
include/math.h:1072: error: parse error before '==' token
include/math.h:1072: error: syntax error at '#' token
include/math.h:1074: error: syntax error at '#' token
include/math.h:1076: error: syntax error at '#' token
make[2]: *** [genautomata.o] Error 1

Error is caused by changes in macro fpclassify() in math.h
that fixincludes now no longer handles correctly.

Previously fpclassify() in math.h was defined to be

----------------------------------------------------
#ifndef _LONGDOUBLE128
#define fpclassify(__x) \
        ((sizeof(__x) == sizeof(float))  ?  _classf((double) __x) : _class(__x))

[... irrelevant stuff deleted ...]

#else
#define fpclassify(__x) \
        ((sizeof(__x) == sizeof(float))  ?  _classf(__x) : \
         (sizeof(__x) == sizeof(double)) ?  _class(__x) : \
                                       ?  _classl128(__x))
---------------------------------------------------------------

Now fpclassify() is 

---------------------------------------------------------------
#ifndef __LONGDOUBLE128
#define fpclassify(__x) \
    (sizeof(__x) == sizeof(float) ?  \
        ((_classf((double)__x) == FP_SNAN) || (_classf((double)__x) == FP_QNAN)
? \
            FP_QNAN : \
            (_classf((double) __x) & 0x00000001 ? \
                _classf((double) __x) - 1 : \
                _classf((double) __x)) ) : \
        ((class(__x) == FP_SNAN) || (class(__x) == FP_QNAN) ? \
            FP_QNAN : \
            (class(__x)  & 0x00000001 ? \
                _class(__x) - 1 : \
                _class(__x))))

[...irrelevant stuff deleted ...]

#else
#define fpclassify(__x) \
 (sizeof(__x) == sizeof(float) ?  \
        ((_classf((double)__x) == FP_SNAN) || (_classf((double)__x) == FP_QNAN)
? \
            FP_QNAN : \
            (_classf((double) __x) & 0x00000001 ? \
                _classf((double) __x) - 1 : \
                _classf((double) __x)))  :\
    (sizeof(__x) == sizeof(double) ? \
        ((class(__x) == FP_SNAN) || (class(__x) == FP_QNAN) ? \
            FP_QNAN : \
            (class(__x)  & 0x00000001 ? \
                _class(__x) - 1 : \
                _class(__x))) :\
    ((_classl128(__x) == FP_SNAN) || (_classl128(__x) == FP_QNAN) ? \
            FP_QNAN: \
            (_classl128(__x) & 0x00000001 ? \
                _classl128(__x) - 1 : \
                _classl128(__x)))))
----------------------------------------------------------------------

The bootstrap error is caused by the fact that fixincludes surrounds
the four occurrances of "class" with 

#ifndef __cplusplus
#endif

For example:

#define fpclassify(__x) \
    (sizeof(__x) == sizeof(float) ?  \
        ((_classf((double)__x) == FP_SNAN) || (_classf((double)__x) == FP_QNAN)
? 
\
            FP_QNAN : \
            (_classf((double) __x) & 0x00000001 ? \
                _classf((double) __x) - 1 : \
                _classf((double) __x)) ) : \
#ifndef __cplusplus
        ((class(__x) == FP_SNAN) || (class(__x) == FP_QNAN) ? \
#endif
            FP_QNAN : \
#ifndef __cplusplus
            (class(__x)  & 0x00000001 ? \
#endif
                _class(__x) - 1 : \
                _class(__x))))

Possible fix - if each of the occurances of "class" is changed to 
"_class", gcc-3.3 will bootstrap.


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

* [Bug bootstrap/11315] bootstrap error with math.h after fixes 5200-01
  2003-06-24 22:00 [Bug bootstrap/11315] New: bootstrap error with math.h after fixes 5200-01 kminola at eng dot umd dot edu
@ 2003-07-16 17:13 ` dje at gcc dot gnu dot org
  2003-10-20 18:16 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dje at gcc dot gnu dot org @ 2003-07-16 17:13 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11315


dje at gcc dot gnu dot org changed:

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


------- Additional Comments From dje at gcc dot gnu dot org  2003-07-16 17:13 -------
While GCC fixincludes could work around this, it really is an AIX problem.  This
has been opened as a defect against AIX 5.2 and will be fixed by IBM APAR
IY46553.  It should be avaliable from IBM Customer Support website in a few
weeks (I'll add the PTF number when I find out) and should appear in the next
maintenance release.


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

* [Bug bootstrap/11315] bootstrap error with math.h after fixes 5200-01
  2003-06-24 22:00 [Bug bootstrap/11315] New: bootstrap error with math.h after fixes 5200-01 kminola at eng dot umd dot edu
  2003-07-16 17:13 ` [Bug bootstrap/11315] " dje at gcc dot gnu dot org
@ 2003-10-20 18:16 ` pinskia at gcc dot gnu dot org
  2003-10-20 18:17 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-20 18:16 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11315


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rylesl at shands dot ufl dot
                   |                            |edu


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-20 18:16 -------
*** Bug 12693 has been marked as a duplicate of this bug. ***


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

* [Bug bootstrap/11315] bootstrap error with math.h after fixes 5200-01
  2003-06-24 22:00 [Bug bootstrap/11315] New: bootstrap error with math.h after fixes 5200-01 kminola at eng dot umd dot edu
  2003-07-16 17:13 ` [Bug bootstrap/11315] " dje at gcc dot gnu dot org
  2003-10-20 18:16 ` pinskia at gcc dot gnu dot org
@ 2003-10-20 18:17 ` pinskia at gcc dot gnu dot org
  2003-12-31 23:48 ` richard_wheeler at cinfin dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-20 18:17 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11315


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |martelm at quark dot vsc dot
                   |                            |edu


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-20 18:16 -------
*** Bug 12539 has been marked as a duplicate of this bug. ***


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

* [Bug bootstrap/11315] bootstrap error with math.h after fixes 5200-01
  2003-06-24 22:00 [Bug bootstrap/11315] New: bootstrap error with math.h after fixes 5200-01 kminola at eng dot umd dot edu
                   ` (2 preceding siblings ...)
  2003-10-20 18:17 ` pinskia at gcc dot gnu dot org
@ 2003-12-31 23:48 ` richard_wheeler at cinfin dot com
  2004-07-14 19:43 ` pinskia at gcc dot gnu dot org
  2004-11-16 19:17 ` dje at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: richard_wheeler at cinfin dot com @ 2003-12-31 23:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From richard_wheeler at cinfin dot com  2003-12-31 23:00 -------
*** Bug 13535 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |richard_wheeler at cinfin
                   |                            |dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11315


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

* [Bug bootstrap/11315] bootstrap error with math.h after fixes 5200-01
  2003-06-24 22:00 [Bug bootstrap/11315] New: bootstrap error with math.h after fixes 5200-01 kminola at eng dot umd dot edu
                   ` (3 preceding siblings ...)
  2003-12-31 23:48 ` richard_wheeler at cinfin dot com
@ 2004-07-14 19:43 ` pinskia at gcc dot gnu dot org
  2004-11-16 19:17 ` dje at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-14 19:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-14 19:43 -------
*** Bug 16549 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gamble at bluemartini dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11315


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

* [Bug bootstrap/11315] bootstrap error with math.h after fixes 5200-01
  2003-06-24 22:00 [Bug bootstrap/11315] New: bootstrap error with math.h after fixes 5200-01 kminola at eng dot umd dot edu
                   ` (4 preceding siblings ...)
  2004-07-14 19:43 ` pinskia at gcc dot gnu dot org
@ 2004-11-16 19:17 ` dje at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: dje at gcc dot gnu dot org @ 2004-11-16 19:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dje at gcc dot gnu dot org  2004-11-16 19:16 -------
Fix included in PTF U488845.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11315


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

end of thread, other threads:[~2004-11-16 19:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-24 22:00 [Bug bootstrap/11315] New: bootstrap error with math.h after fixes 5200-01 kminola at eng dot umd dot edu
2003-07-16 17:13 ` [Bug bootstrap/11315] " dje at gcc dot gnu dot org
2003-10-20 18:16 ` pinskia at gcc dot gnu dot org
2003-10-20 18:17 ` pinskia at gcc dot gnu dot org
2003-12-31 23:48 ` richard_wheeler at cinfin dot com
2004-07-14 19:43 ` pinskia at gcc dot gnu dot org
2004-11-16 19:17 ` dje at gcc dot gnu dot 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).