This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: alignment warning
Here is the output:
kgy@notebook:~> avr-g++ -v x.cpp
Using built-in specs.
Target: avr
Configured
with: ../../gcc-4.2.1/configure --target=avr --enable-anguages=c,c++ --disable-libssp :
(reconfigured) ../../gcc-4.2.1/configure --target=avr --enable-anguages=c,c++ --disable-libssp --disable-libobjc
Thread model: single
gcc version 4.2.1
/usr/local/libexec/gcc/avr/4.2.1/cc1plus -quiet -v x.cpp -quiet -dumpbase
x.cpp -auxbase
x -version -fno-rtti -fno-enforce-eh-specs -fno-exceptions -o /tmp/ccaYILwK.s
ignoring nonexistent
directory "/usr/local/lib/gcc/avr/4.2.1/../../../../avr/include/c++/4.2.1"
ignoring nonexistent
directory "/usr/local/lib/gcc/avr/4.2.1/../../../../avr/include/c++/4.2.1/avr"
ignoring nonexistent
directory "/usr/local/lib/gcc/avr/4.2.1/../../../../avr/include/c++/4.2.1/backward"
ignoring nonexistent
directory "/usr/local/lib/gcc/avr/4.2.1/../../../../avr/sys-include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc/avr/4.2.1/include
/usr/local/lib/gcc/avr/4.2.1/../../../../avr/include
End of search list.
GNU C++ version 4.2.1 (avr)
compiled by GNU C version 4.1.2 20061115 (prerelease) (SUSE Linux).
GGC heuristics: --param ggc-min-expand=63 --param ggc-min-heapsize=63332
Compiler executable checksum: 562f4e28494243d4584fe919481aacc3
x.cpp:2: warning: alignment of âc1::_ZTV2c1â is greater than maximum object
file alignment. Using 1
/usr/local/lib/gcc/avr/4.2.1/../../../../avr/bin/as -o /tmp/cc4WWe4m.o /tmp/ccaYILwK.s
/usr/local/lib/gcc/avr/4.2.1/../../../../avr/bin/ld -m
avr2 /usr/local/lib/gcc/avr/4.2.1/../../../../avr/lib/crts8515.o -L/usr/local/lib/gcc/avr/4.2.1 -L/usr/local/lib/gcc/avr/4.2.1/../../../../avr/lib /tmp/cc4WWe4m.o -lgcc -lm -lgcc -lc -lgcc
> Kïïvesdi Gyïïrgy writes:
> > > Could you provide a complete, small compilable example that produces
> > > the warning?
> >
> > -------------------- source begin ---------------------
> > class c1
> > {
> > virtual void x() { }
> > };
> >
> > c1 zzz;
> >
> > int main(int argc, char **argv)
> > {
> > return 0;
> > }
> > -------------------- source end -----------------------
> >
> > This is a full source code which prodices the warning message:
> >
> > $> avr-g++ x.cpp
> >
> > x.cpp:2: warning: alignment of ïïïc1::_ZTV2c1ïïï is greater than maximum
> > object file alignment. Using 1
> >
> > The x86 version of gcc does not send any messages.
>
> OK, please try this test with 'gcc -v'. Show us the output.
>
> Andrew.