This is the mail archive of the gcc-bugs@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]

g++ bug


Hi there,

I read your bug reporting stuff and I was goint to take the "Only
excuse" amendment in sending just this:

----------------------------------------------------------------------
c2h5oh:~/gccbug$ >>> gcc -v
Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
c2h5oh:~/gccbug$ >>> cat gccbug.c 
struct matrix
{
  int a;              __attribute__ ((packed));  // Oops! :)
};

main()
{
  ;
}
c2h5oh:~/gccbug$ >>> g++ gccbug.c 
gccbug.c:3: Internal compiler error.
gccbug.c:3: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
gccbug.c:3: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
c2h5oh:~/gccbug$ >>> gcc gccbug.c 
gccbug.c:3: parse error before `__attribute__'
gccbug.c:3: warning: no semicolon at end of struct or union
c2h5oh:~/gccbug$ >>> 
----------------------------------------------------------------------

But in the end I decided to go the whole nine yards, so I did this:

----------------------------------------------------------------------
c2h5oh:~/gccbug$ >>> gcc -v -save-temps gccbug.c 
Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
 /usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ gccbug.c gccbug.i
GNU CPP version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/cc1 gccbug.i -quiet -dumpbase gccbug.c -version -o gccbug.s
GNU C version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) (i386-slackware-linux) compiled by GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).
gccbug.c:3: parse error before `__attribute__'
gccbug.c:3: warning: no semicolon at end of struct or union
c2h5oh:~/gccbug$ >>> g++ -v -save-temps gccbug.c 
Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
 /usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ gccbug.c gccbug.ii
GNU CPP version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++-2
 /usr/local/include
 /usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/cc1plus gccbug.ii -quiet -dumpbase gccbug.cc -version -o gccbug.s
GNU C++ version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) (i386-slackware-linux) compiled by GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).
gccbug.c:3: Internal compiler error.
gccbug.c:3: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
gccbug.c:3: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
c2h5oh:~/gccbug$ >>> ls -rlt
total 25
-rw-r--r--   1 ged      users          96 May 29 13:16 gccbug.c
-rw-r--r--   1 ged      users         101 Jun 15 18:07 gccbug.i
-rw-r--r--   1 ged      users          52 Jun 15 18:08 gccbug.s
-rw-r--r--   1 ged      users         101 Jun 15 18:08 gccbug.ii
c2h5oh:~/gccbug$ >>> tar czv gccbug* > gccbug.tgz
gccbug.c
gccbug.i
gccbug.ii
gccbug.s
c2h5oh:~/gccbug$ >>> 
----------------------------------------------------------------------

I didn't build the compiler, so I don't know what options were used,
but you could ask Patrick Volkerding because he presumably does know.
It was supplied with the Slackware 7.1 (July 2000) realease of Linux.

I plead that I haven't built the latest compiler because I still
want to be able to compile my operating system (currently 2.2.16).

I know it's easy to work around this bug; I don't care about it; but
it seems it would be a shame to release the next compiler version with
it still in there if there's an easy fix for it.

If you do need any more info, please let me know.

73,
Ged.

Complete bug report. I hope.


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