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 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
* 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     ` Andreas Schwab
1998-01-19  2:25     ` Manfred Hollstein

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