avr-gcc-list
[Top][All Lists]
Advanced

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

[avr-gcc-list] Multidimensional arrays?


From: Russell E. Hoffman
Subject: [avr-gcc-list] Multidimensional arrays?
Date: Tue, 11 Mar 2003 15:02:02 -0500

Hi, this is my first post to the AVR-GCC list.

My question is: are multidimensional arrays broken in avr-gcc? When I
compile the following code:

unsigned char foo[3][4];

I get the following warning:

avr-gcc -c -g -Os -funsigned-char -funsigned-bitfields -fpack-struct
-Wall -Wstrict-prototypes -Wa,-ahlms=rev1.lst -mmcu=atmega8 -I. rev1.c
-o rev1.o

avr-gcc -WI,-Map=rev1.map,--cref -mmcu=atmega8 rev1.o -lm --output
rev1.elf
avr-objcopy -O ihex -R .eeprom rev1.elf rev1.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load"
--change-section-lma .eeprom=0 -O ihex rev1.elf rec1.eep
avr-objdump -h -S rev1.elf >rev1.lss
objtool loadelf rev1.elf mapfile rev1.map writecof rev1.cof
WARNING: - symbol 'foo' could not be resolved to a type - using VOID.

I believe the error is actually from "objtool", not gcc itself. I'm
using avr-gcc for Windows, and using the stock Makefile from the demo
code. I use AVR Studio 3.56.

My question is -- is this a known bug? Will the code still execute
correctly, even if perhaps the simulator won't trace it properly?

Thanks,

Russ Hoffman




reply via email to

[Prev in Thread] Current Thread [Next in Thread]