Question about---error: stray ‘@’ in program

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I recently upgraded my gcc compiler to version 4.4.0. During routine
testing of the new version, I tried to compile a project that I
completed in early 2003 using a gcc compiler from the late 1990s. I
get numerous compiler errors with the new version. The following
10-line program illustrates what is going on:

>$ cat hw.c
enum {Tag0 = 0,
      A,
      A1@B,
      C,
      Tag1};

int main(int argc,char *argv[])
{
     static int i = 0;
}

>$ gcc -save-temps -x c -o hw hw.c
hw.c:3: error: stray ‘@’ in program
hw.c:3: error: expected ‘,’ or ‘}’ before ‘B’

>$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
                 --infodir=/usr/share/info
                 --with-bugurl=http://bugzilla.redhat.com/bugzilla
                 --enable-bootstrap --enable-shared
                 --enable-threads=posix --enable-checking=release
                 --with-system-zlib --enable-__cxa_atexit
                 --disable-libunwind-exceptions
                 --enable-languages=c,c++,objc,obj-c++,java,fortran,ada
                 --enable-java-awt=gtk --disable-dssi --enable-plugin
                 --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
                 --enable-libgcj-multifile --enable-java-maintainer-mode
                 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
                 --disable-libjava-multilib --with-ppl --with-cloog
                 --with-tune=generic --with-arch_32=i586
                 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC)

NOTE: I explicitly told gcc I was giving it C code. I get the same
errors with and without the -x c option. I had no problems with code
similar to the above back in 2003, but, alas, I don't know the version
of the gcc compiler I was using back then.

I've searched on the net, but I can't find an explanation of what is
going on with the above. If you know, please tell me.

Thanks,
David


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux