* Alexander Neumann fd0@lochraster.org [08-02-24 20:10]:
Hi Robert,
- Robert treboriks@web.de wrote:
Dabei bekomme ich jetzt einiges mehr an Meldung: [...] avr-gcc -DRS485_ADDRESS=0x01 -g -Os -finline-limit=800 -mmcu=atmega8
- -DF_CPU=16000000UL -std=gnu99 -c -o fifo.o fifo.c
fifo.c:32: warning: C99 inline functions are not supported; using GNU89 fifo.c:32: warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute fifo.c:41: warning: C99 inline functions are not supported; using GNU89 fifo.c:46: warning: C99 inline functions are not supported; using GNU89 fifo.c:54: warning: C99 inline functions are not supported; using GNU89 fifo.c:66: warning: C99 inline functions are not supported; using GNU89 fifo.c:77: warning: C99 inline functions are not supported; using GNU89
Das ist etwas komisch, weil er sich ueber einen alten Standard beschwert, obwohl mit "-std=gnu99" ein neuer C-Standard festgelegt wurde. Welche Version vom avr-gcc setzt du ein? Wo kommt die her?
Eine neue, vermutlich. Die Warnung ist erst in neueren GCC-Versionen drin. Aus der Doku:
| `-fgnu89-inline' | The option `-fgnu89-inline' tells GCC to use the traditional GNU | semantics for `inline' functions when in C99 mode. *Note An | Inline Function is As Fast As a Macro: Inline. Using this option | is roughly equivalent to adding the `gnu_inline' function | attribute to all inline functions (*note Function Attributes::). | | This option is accepted by GCC versions 4.1.3 and up. In GCC | versions prior to 4.3, C99 inline semantics are not supported, and | thus this option is effectively assumed to be present regardless | of whether or not it is specified; the only effect of specifying | it explicitly is to disable warnings about using inline functions | in C99 mode. Likewise, the option `-fno-gnu89-inline' is not | supported in versions of GCC before 4.3. It will be supported | only in C99 or gnu99 mode, not in C89 or gnu89 mode.
Also, einfach -fgnu89-inline zu den CFLAGS hinzufügen, um die Warnung loszuwerden.