www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1999/05/29/10:11:43

Message-Id: <199905291405.XAA02205@mail.itjit.ne.jp>
To: pgcc AT delorie DOT com
Subject: Re: Odd pgcc 19990517 parsing bug
In-reply-to: Your message of "Wed, 26 May 1999 21:57:00 GMT"
References: <Pine DOT LNX DOT 4 DOT 10 DOT 9905262152320 DOT 2828-100000 AT data DOT mandrakesoft DOT com>
Date: Sat, 29 May 1999 17:33:13 +0900
From: "NISHIGAMI.S" <nsh AT itjit DOT ne DOT jp>
Reply-To: pgcc AT delorie DOT com

Hello,

I have the same problem in another environment.  I can build
a corresponding snapshot of egcs-19990517, so this might be
related to pgcc.

In message <Pine DOT LNX DOT 4 DOT 10 DOT 9905262152320 DOT 2828-100000 AT data DOT mandrakesoft DOT com>
	Subject: Odd pgcc 19990517 parsing bug
	Bernhard Rosenkraenzer <bero AT mandrakesoft DOT com> writes:

> While trying to compile pgcc from current CVS on Linux 2.2/glibc 2.1.1, I
> get

I use FreeBSD-2.2.8R, and pgcc-current-snapshot.tar.gz from
ftp.  Place of error is little different, the reason is vary
similar.  xcpp made by stage1 has trouble.

./xgcc -v
Using builtin specs.
gcc version pgcc-2.93.22 19990517 (gcc2 ss-980929 experimental)

./xgcc -B./ -B/usr/local/i586-freebsd/bin/ -DIN_GCC -DHAIFA
-W -Wall -mcpu=pentium -O2 -pipe -I./include -g1 -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -I. -I../../gcc -I../../gcc/config
-I../../gcc/../include -c -DL_muldi3 ../../gcc/libgcc2.c -o
_muldi3.o

In file included from ../../gcc/libgcc2.c:41:
/usr/include/stdlib.h:84: parse error before string constant
/usr/include/stdlib.h:186: parse error before `}'

    82  #define MB_CUR_MAX      __mb_cur_max
    83
    84  __BEGIN_DECLS
    85  void     abort __P((void)) __dead2;
 [...]  
   185  #endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
   186  __END_DECLS
   187
   188  #endif /* !_STDLIB_H_ */

Results of following flags are all same.
	NG: -march=pentium -mcpu=pentium -O2
	NG: -march=pentium -mcpu=pentium -O0
	NG: -march=i386 -mcpu=i386 -O0
	NG: -O0
First complier is NOT affected, gcc-2.7.2.1 or pgcc-2.92.25.

> Where I have modified stddef.h to trace the bug. The relevant lines of
> the stddef.h generating this message are

I found sys/cdefs.h is preprocessed illegally.

    43  #ifdef __cplusplus
    44  #error DEBUG1
    45  #endif
    46  #ifndef __cplusplus
    47  #error DEBUG2
    48  #endif
    49  #if defined(__cplusplus)
    50  #error DEBUG3
    51  #endif
    52  #if !defined(__cplusplus)
    53  #error DEBUG4
    54  #endif
    55  #if 0
    56  #error DEBUG5
    57  #endif
    58  #if 1
    59  #error DEBUG6
    60  #endif
    61  
    62  #if defined(__cplusplus)
    63  #define __BEGIN_DECLS   extern "C" {
    64  #define __END_DECLS     }
    65  #else
    66  #define __BEGIN_DECLS
    67  #define __END_DECLS
    68  #endif

In file included from /usr/include/stdlib.h:39,
                 from ../../gcc/libgcc2.c:41:
include/sys/cdefs.h:47: #error DEBUG2
include/sys/cdefs.h:50: #error DEBUG3
include/sys/cdefs.h:53: #error DEBUG4
include/sys/cdefs.h:56: #error DEBUG5
include/sys/cdefs.h:59: #error DEBUG6

`__BEGIN_DECLS' and `__END_DECLS' for c++ cause the error.

> So apparently 0 || 0 || 0 || 0 == 1

`#ifdef' and `#ifndef' are correct, `#if' is ALWAYS true!
I don't know what to do after this.

> Seems the pentiumpro bug can occur in "normal" pentium mode under certain
> circumstances.

Yes, me too, although I don't have pentiumpro. ;)
---
nsh AT itjit DOT ne DOT jp

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019