[En-Nut-Discussion] AVR-GCC 4.x compiler bug.
Matthias Ringwald
mringwal at inf.ethz.ch
Mon Nov 27 12:14:56 CET 2006
Hi
although the GCC4.x signedness issues have been taken care of in
Nut/OS, the build of BTnut fails as the switch
in the ioctl function of usart.c hits a compiler bug when using -Os
(which is our default)
see:
http://sourceforge.net/tracker/index.php?
func=detail&aid=1585230&group_id=34079&atid=410687
we played around with compiler flags -Os and/or -fno-jump-tables
usart.btnode3.o
with -Os (gcc 3.4.5) 2316
with -Os -fno-jump-tables: 3932
without -Os: 6184
a) -Os is important
b) jump-tables, too
with -Os -fno-jump-tables the code size increase by 2k
we tried to change the code to work-around this bug. one solution is
to split the
single switch into two switches. This looks strange, but works.
I really don't like to change code to avoid a compiler bug. The
latest avr-gcc 4.2
still fails to compile this switch.
is anyone who has some smart solution to this?
what can we do?
cheers
Matthias
More information about the En-Nut-Discussion
mailing list