Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!CS.UTEXAS.EDU!meyering From: meyering@CS.UTEXAS.EDU (Jim Meyering) Newsgroups: gnu.gcc.bug Subject: gcc-1.36/cc1 dies with fatal signal: -Wswitch and -traditional Message-ID: <8910281857.AA02111@ai.cs.utexas.edu> Date: 28 Oct 89 18:57:58 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: University of Texas at Austin Computer Sciences Department Lines: 37 /* * Using unmodified gcc-1.36, config.gcc {sun3,sun4-os4}: * * This program causes cc1 to generate a signal 10 (or 11) when * compiled with both the options -Wswitch and -traditional. * If c has any type other than `unsigned char' or 'unsigned char *' * gcc runs fine. GNU regex.c (in sed-1.06) has code like this. * * A suggestion to people using gcc: * create an executable named gcc with the 2 lines: * #!/bin/sh * /p/bin/gcc -Wswitch "$@" * where you'd replace /p/bin/gcc with the absolute pathname of the * binary executable on your system. Then put this gcc in a directory * that precedes (in your $PATH) that of the binary. */ void foo(c) unsigned char c; { typedef enum {TRUE, FALSE} Bool; switch ((Bool) c) { case TRUE: break; } } /p/bin/gcc -v -Wswitch -traditional -c foo.c -o foo.o gcc version 1.36 /p/lib/gcc-1.36/gcc-cpp -v -undef -D__GNUC__ -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -traditional foo.c /usr/tmp/cca01286.cpp GNU CPP version 1.36 /p/lib/gcc-1.36/gcc-cc1 /usr/tmp/cca01286.cpp -quiet -dumpbase foo.c -Wswitch -traditional -version -o /usr/tmp/cca01286.s GNU C version 1.36 (sparc) compiled by GNU C version 1.36. default target switches: -mfpu -mepilogue /p/bin/gcc: Program cc1 got fatal signal 11. --- Jim Meyering meyering@cs.utexas.edu