This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: alignment warning


> Without seeing the actual code that casues this warning?  No.  We're
> clever, but we aren't telepathic.  :-)

You are right, here is the source (but I think it does not say anything):

include/serial.h:

26:
27: class Serial: public ModuleBase
28: {
29:   public:
30: 

and the full message:

./include/serial.h:28: warning: alignment of âSerial::_ZTV6Serialâ is greater 
than maximum object file alignment.  Using 1

The commandline:

/usr/local/bin/avr-g++ -mmcu=at90usb162 -g -Winline --param 
max-inline-insns-single=2000 -Wall -Os -I./include -c serial.cpp

> The problem is caused by the fact that the compiler (or assembler;
> could be either) generates a declaration that ïïïSerial::_ZTV6Serialïïï
> must be aligned at a particular boundary, but your linker doesn't
> support such alignment.

The message is reported by the compiler, the linker does not report any 
problems.

Regards
K. Gy.


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