This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Strange behavior of gcc-3.1
- From: "Claudio Bley" <bley at cs dot uni-magdeburg dot de>
- To: Agust Karlsson <Gusti at pallas dot dk>
- Cc: "'gcc-help at gcc dot gnu dot org'" <gcc-help at gcc dot gnu dot org>,Søren Kann <SQ at pallas dot dk>
- Date: Tue, 23 Jul 2002 13:16:58 +0200
- Subject: Re: Strange behavior of gcc-3.1
- References: <D0B43857843DD41185DE0060979AC20C2FD370@intermail.pallas.dk>
>>>>> "Agust" == Agust Karlsson <Gusti@pallas.dk> writes:
Agust> I have just upgraded my gcc from 2.96 (RedHat 7.2
Agust> distribution) to 3.1 (compiled from source with
Agust> prefix=/usr) Oddly, things that did work OK before seem to
Agust> fail now.
Agust> I have included an example with the error messages I get.
Agust> Does someone have a clou on what's happened???
Agust> ---------- struct Data { int var[10]; };
You declared a type, but no instance of it.
struct Data { int var[10}; } Data;
Agust> void f1( int *param) { int p; p = param[ 7]; if (( 7<=p) &&
Agust> (p<= 14)) Data.var[ 7] = p; // p = param[ 9]; // any of
Agust> these two lines // if (( 5<=p) && (p<= 30)) // can provoke
Agust> the error in the next line Data.var[ 9] = p; }
Agust> // ---------------------------
Agust> // how to declare and use a packed enum ?
Agust> typedef enum { v11=1, v12=2 } e1 __attribute__ ((packed));
typedef enum e1 { v11=1, v12=2 } e1 __attribute__ ((packed));
Agust> void g1( e1 par) {}
enum e2 { v21=1, v22=2} __attribute__ ((packed));
It seems this doesn't work. You may want to file a bug report.
Claudio