public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: egcs-980115 sunos4/hpux9 gengenrtl.c bootstrap failure
  1998-01-19  2:25 egcs-980115 sunos4/hpux9 gengenrtl.c bootstrap failure Kaveh R. Ghazi
@ 1998-01-19  2:25 ` Jeffrey A Law
  1998-01-20  4:00   ` Richard Henderson
  1998-01-21  9:34 ` Branko Cibej
  1 sibling, 1 reply; 9+ messages in thread
From: Jeffrey A Law @ 1998-01-19  2:25 UTC (permalink / raw)
  To: Kaveh R. Ghazi; +Cc: rth, egcs

  In message < 199801180752.CAA04101@caip.rutgers.edu >you write:
  > Jeff,
  > 
  > 	I thought concatenation is ##.  We're referring to the #
  > operator, which does stringizing, not concatenating. 
Opps.  You're absolutely correct.


  > 	Anyway, I think rth's patch works, but it dangerously relies on
  > the fact that if !defined(__STDC__) then hopefully cpp replaces macros
  > even inside double quotes.  I already found one platform where this is
  > not true, ie Irix4 cc.  That compiler (in default mode, ie -xansi) does
  > not define __STDC__, but it understands # and does not replace labels in
  > double quotes.  But Irix4 is very old, six other systems I tested
  > (incluiding Irix6) do work with the above patch. 
  > 
  > 	For this reason I would have preferred if this patch was instead
  > an autoconf check to detect if the # operator works in cpp.  But I can
  > live with the above patch in a crunch. 
Richard -- can you take care of this.

jeff

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

* Re: egcs-980115 sunos4/hpux9 gengenrtl.c bootstrap failure
@ 1998-01-19  2:25 Kaveh R. Ghazi
  1998-01-19  2:25 ` Jeffrey A Law
  1998-01-21  9:34 ` Branko Cibej
  0 siblings, 2 replies; 9+ messages in thread
From: Kaveh R. Ghazi @ 1998-01-19  2:25 UTC (permalink / raw)
  To: law, rth; +Cc: egcs, ghazi

 > From: Jeffrey A Law <law@hurl.cygnus.com>
 > 
 >   In message < 19980115170807.25031@dot.cygnus.com >you write:
 >   > Right.  How about this?
 > 
 >   > Index: gengenrtl.c
 >   > ===================================================================
 >   > RCS file: /egcs/carton/cvsfiles/egcs/gcc/gengenrtl.c,v
 >   > retrieving revision 1.2
 >   > diff -c -p -d -r1.2 gengenrtl.c
 >   > *** gengenrtl.c	1998/01/13 09:06:31	1.2
 >   > --- gengenrtl.c	1998/01/16 01:04:03
 >   > *************** struct rtx_definition 
 >   > *** 35,41 ****
 >   > --- 35,45 ----
 >   >     const char *enumname, *name, *format;
 >   >   };
 >   >   
 >   > + #ifdef __STDC__
 >   >   #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { # ENUM, NAME, FORMAT },
 >   > + #else
 >   > + #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { "ENUM", NAME, FORMAT },
 >   > + #endif
 > 
 > Concatenation in non-ANSI compilers is generally handled with /**/
 > jeff

Jeff,

	I thought concatenation is ##.  We're referring to the #
operator, which does stringizing, not concatenating. 

	Anyway, I think rth's patch works, but it dangerously relies on
the fact that if !defined(__STDC__) then hopefully cpp replaces macros
even inside double quotes.  I already found one platform where this is
not true, ie Irix4 cc.  That compiler (in default mode, ie -xansi) does
not define __STDC__, but it understands # and does not replace labels in
double quotes.  But Irix4 is very old, six other systems I tested
(incluiding Irix6) do work with the above patch. 

	For this reason I would have preferred if this patch was instead
an autoconf check to detect if the # operator works in cpp.  But I can
live with the above patch in a crunch. 

		--Kaveh

--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.

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

* Re: egcs-980115 sunos4/hpux9 gengenrtl.c bootstrap failure
  1998-01-19  2:25 ` Jeffrey A Law
@ 1998-01-20  4:00   ` Richard Henderson
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Henderson @ 1998-01-20  4:00 UTC (permalink / raw)
  To: law; +Cc: Kaveh R. Ghazi, rth, egcs

On Sun, Jan 18, 1998 at 12:56:04AM -0700, Jeffrey A Law wrote:
>   > 	For this reason I would have preferred if this patch was instead
>   > an autoconf check to detect if the # operator works in cpp.  But I can
>   > live with the above patch in a crunch. 
> Richard -- can you take care of this.

Done.


r~

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

* Re: egcs-980115 sunos4/hpux9 gengenrtl.c bootstrap failure
  1998-01-19  2:25 egcs-980115 sunos4/hpux9 gengenrtl.c bootstrap failure Kaveh R. Ghazi
  1998-01-19  2:25 ` Jeffrey A Law
@ 1998-01-21  9:34 ` Branko Cibej
  1 sibling, 0 replies; 9+ messages in thread
From: Branko Cibej @ 1998-01-21  9:34 UTC (permalink / raw)
  To: Kaveh R. Ghazi; +Cc: egcs

>         Anyway, I think rth's patch works, but it dangerously relies on
> the fact that if !defined(__STDC__) then hopefully cpp replaces macros
> even inside double quotes.  I already found one platform where this is
> not true, ie Irix4 cc.  That compiler (in default mode, ie -xansi) does
> not define __STDC__, but it understands # and does not replace labels in
> double quotes.  But Irix4 is very old, six other systems I tested
> (incluiding Irix6) do work with the above patch.

Another such platform is Windows (NT and 95), because Microsoft's Win32 headers use
ANSI cpp directives, but don't compile in strict-ANSI mode.

I think this doesn't have any very immediate impact on egcs, though... and we have
cygwin32.

    Brane
--
Branko Cibej   <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
phone: (++386 61) 186 53 49  fax: (++386 61) 186 52 70



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

* Re: egcs-980115 sunos4/hpux9 gengenrtl.c bootstrap failure
  1998-01-17 22:30   ` Jeffrey A Law
  1998-01-19  2:25     ` Manfred Hollstein
@ 1998-01-19  2:25     ` Andreas Schwab
  1 sibling, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 1998-01-19  2:25 UTC (permalink / raw)
  To: law; +Cc: Richard Henderson, Kaveh R. Ghazi, egcs

Jeffrey A Law <law@cygnus.com> writes:

|>   > + #ifdef __STDC__
|>   >   #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { # ENUM, NAME, FORMAT },
|>   > + #else
|>   > + #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { "ENUM", NAME, FORMAT },
|>   > + #endif
|> Concatenation in non-ANSI compilers is generally handled with /**/

But that's stringizing, not concatenation (##).

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"
schwab@gnu.org

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

* Re: egcs-980115 sunos4/hpux9 gengenrtl.c bootstrap failure
  1998-01-17 22:30   ` Jeffrey A Law
@ 1998-01-19  2:25     ` Manfred Hollstein
  1998-01-19  2:25     ` Andreas Schwab
  1 sibling, 0 replies; 9+ messages in thread
From: Manfred Hollstein @ 1998-01-19  2:25 UTC (permalink / raw)
  To: law; +Cc: rth, ghazi, egcs

On Sat, 17 January 1998, 23:04:27, law@cygnus.com wrote:

 > 
 >   In message < 19980115170807.25031@dot.cygnus.com >you write:
 >   > Right.  How about this?
 > 
 >   > Index: gengenrtl.c
 >   > ===================================================================
 >   > RCS file: /egcs/carton/cvsfiles/egcs/gcc/gengenrtl.c,v
 >   > retrieving revision 1.2
 >   > diff -c -p -d -r1.2 gengenrtl.c
 >   > *** gengenrtl.c	1998/01/13 09:06:31	1.2
 >   > --- gengenrtl.c	1998/01/16 01:04:03
 >   > *************** struct rtx_definition 
 >   > *** 35,41 ****
 >   > --- 35,45 ----
 >   >     const char *enumname, *name, *format;
 >   >   };
 >   >   
 >   > + #ifdef __STDC__
 >   >   #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { # ENUM, NAME, FORMAT },
 >   > + #else
 >   > + #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { "ENUM", NAME, FORMAT },
 >   > + #endif
 > Concatenation in non-ANSI compilers is generally handled with /**/

But ENUM needs to be `stringified', hence Richard is right.

Manfred

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

* Re: egcs-980115 sunos4/hpux9 gengenrtl.c bootstrap failure
  1998-01-16  2:26 ` Richard Henderson
@ 1998-01-17 22:30   ` Jeffrey A Law
  1998-01-19  2:25     ` Manfred Hollstein
  1998-01-19  2:25     ` Andreas Schwab
  0 siblings, 2 replies; 9+ messages in thread
From: Jeffrey A Law @ 1998-01-17 22:30 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Kaveh R. Ghazi, egcs

  In message < 19980115170807.25031@dot.cygnus.com >you write:
  > Right.  How about this?

  > Index: gengenrtl.c
  > ===================================================================
  > RCS file: /egcs/carton/cvsfiles/egcs/gcc/gengenrtl.c,v
  > retrieving revision 1.2
  > diff -c -p -d -r1.2 gengenrtl.c
  > *** gengenrtl.c	1998/01/13 09:06:31	1.2
  > --- gengenrtl.c	1998/01/16 01:04:03
  > *************** struct rtx_definition 
  > *** 35,41 ****
  > --- 35,45 ----
  >     const char *enumname, *name, *format;
  >   };
  >   
  > + #ifdef __STDC__
  >   #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { # ENUM, NAME, FORMAT },
  > + #else
  > + #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { "ENUM", NAME, FORMAT },
  > + #endif
Concatenation in non-ANSI compilers is generally handled with /**/

jeff

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

* Re: egcs-980115 sunos4/hpux9 gengenrtl.c  bootstrap failure
  1998-01-16  1:51 Kaveh R. Ghazi
@ 1998-01-16  2:26 ` Richard Henderson
  1998-01-17 22:30   ` Jeffrey A Law
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Henderson @ 1998-01-16  2:26 UTC (permalink / raw)
  To: Kaveh R. Ghazi; +Cc: egcs, rth

On Thu, Jan 15, 1998 at 02:01:40PM -0500, Kaveh R. Ghazi wrote:
> 	I am unable to bootstrap egcs-980115 using native cc on
> sparc-sun-sunos4.1.3 or hppa1.1-hp-hpux9.01 because I get errors of
> the following nature:
> 
>  > cc -c  -DIN_GCC    -g  -DHAVE_CONFIG_H     -I. -I. -I./config ./gengenrtl.c
>  > "./rtl.def", line 67: illegal character: '#'

Right.  How about this?


r~



Index: gengenrtl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/gengenrtl.c,v
retrieving revision 1.2
diff -c -p -d -r1.2 gengenrtl.c
*** gengenrtl.c	1998/01/13 09:06:31	1.2
--- gengenrtl.c	1998/01/16 01:04:03
*************** struct rtx_definition 
*** 35,41 ****
--- 35,45 ----
    const char *enumname, *name, *format;
  };
  
+ #ifdef __STDC__
  #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { # ENUM, NAME, FORMAT },
+ #else
+ #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { "ENUM", NAME, FORMAT },
+ #endif
  
  struct rtx_definition defs[] = 
  {  

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

* egcs-980115 sunos4/hpux9 gengenrtl.c  bootstrap failure
@ 1998-01-16  1:51 Kaveh R. Ghazi
  1998-01-16  2:26 ` Richard Henderson
  0 siblings, 1 reply; 9+ messages in thread
From: Kaveh R. Ghazi @ 1998-01-16  1:51 UTC (permalink / raw)
  To: egcs; +Cc: rth

	I am unable to bootstrap egcs-980115 using native cc on
sparc-sun-sunos4.1.3 or hppa1.1-hp-hpux9.01 because I get errors of
the following nature:

 > cc -c  -DIN_GCC    -g  -DHAVE_CONFIG_H     -I. -I. -I./config ./gengenrtl.c
 > "./rtl.def", line 67: illegal character: '#'
 > "./rtl.def", line 71: illegal character: '#'
 > "./rtl.def", line 71: warning: illegal combination of pointer and integer, op =
 > "./rtl.def", line 78: illegal character: '#'
 > "./rtl.def", line 78: warning: illegal combination of pointer and integer, op =
 > "./rtl.def", line 82: illegal character: '#'
 > "./rtl.def", line 82: warning: illegal combination of pointer and integer, op =
 > "./rtl.def", line 121: illegal character: '#'
 > "./rtl.def", line 121: warning: illegal combination of pointer and integer, op =
 > "./rtl.def", line 128: illegal character: '#'
 > [... goes on for many lines ...]

	I'm pretty sure this is due to the use of some ANSI C'ism,
specifically the definition of DEF_RTL_EXPR() in gengenrtl.c which
attempts to use the stringizing operator (#) to make a quoted string
out of an enum label.

#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { # ENUM, NAME, FORMAT },

		--Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.

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

end of thread, other threads:[~1998-01-21  9:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-19  2:25 egcs-980115 sunos4/hpux9 gengenrtl.c bootstrap failure Kaveh R. Ghazi
1998-01-19  2:25 ` Jeffrey A Law
1998-01-20  4:00   ` Richard Henderson
1998-01-21  9:34 ` Branko Cibej
  -- strict thread matches above, loose matches on Subject: below --
1998-01-16  1:51 Kaveh R. Ghazi
1998-01-16  2:26 ` Richard Henderson
1998-01-17 22:30   ` Jeffrey A Law
1998-01-19  2:25     ` Manfred Hollstein
1998-01-19  2:25     ` Andreas Schwab

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).