This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fixincl.c uses non-portable #error and string concatenation


I was trying to get the C fixincl to run on a poor SPARCstation
running StunOS 4.1.3, when using cc as the bootstrap compiler.  The
first problem is that cc doesn't support the `#error' directive; fixed
in the attached patch.  Ok to install?

The second problem is that cc does not support concatenation of
adjacent strings, and not only inclhack.def seems to assume this is
possible, but also fixincl.tpl uses `"|"' strings to separate
filenames.

We could remove the explicit adjacent strings from inclhack.def, but
fixincl.tpl would have to be modified somehow in order to generate a
single string even for multiple files, instead of multiple adjacent
strings.  Bruce, how can we achieve this with AutoGen?  Couldn't we
use AutoGen to merge adjacent strings in inclhack.def too?

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists
Index: gcc/ChangeLog
from  Alexandre Oliva  <oliva@dcc.unicamp.br>

	* fixinc/fixincl.c: Remove #error, it is not portable.

Index: gcc/fixinc/fixincl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/fixinc/fixincl.c,v
retrieving revision 1.9
diff -u -r1.9 fixincl.c
--- gcc/fixinc/fixincl.c	1999/05/12 07:32:58	1.9
+++ gcc/fixinc/fixincl.c	1999/05/17 22:56:32
@@ -269,7 +269,7 @@
       }
     }
 #else
-#error "NON-BOGUS LIMITS NOT SUPPORTED?!?!"
+  /*#*/ error "NON-BOGUS LIMITS NOT SUPPORTED?!?!"
 #endif
 
   /*

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]