Opened 22 months ago
Closed 22 months ago
#66722 closed defect (fixed)
avrdude fails to build with gcc-4.2: error: ‘for’ loop initial declaration used outside C99 mode; error: ‘struct Data’ has no member named ‘ll’
Reported by: | barracuda156 | Owned by: | barracuda156 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | powerpc, leopard, snowleopard, rosetta | Cc: | |
Port: | avrdude |
Description
Making all in . make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_cross_avrdude/avrdude/work/avrdude-7.0' CC avrdude-main.o CC avrdude-whereami.o CC libavrdude_a-config_gram.o CC libavrdude_a-lexer.o CC avrdude-term.o CC libavrdude_a-avr.o CC libavrdude_a-avr910.o CC libavrdude_a-arduino.o main.c: In function ‘replace_backslashes’: main.c:305: error: ‘for’ loop initial declaration used outside C99 mode term.c: In function ‘chardump_line’: term.c:190: error: redeclaration of ‘i’ with no linkage term.c:187: error: previous declaration of ‘i’ was here term.c:190: error: ‘for’ loop initial declaration used outside C99 mode term.c: In function ‘cmd_dump’: term.c:312: error: ‘for’ loop initial declaration used outside C99 mode term.c: In function ‘cmd_write’: term.c:420: error: unknown field ‘ll’ specified in initializer term.c:421: warning: missing braces around initializer term.c:421: warning: (near initialization for ‘data.<anonymous>’) term.c:522: error: ‘for’ loop initial declaration used outside C99 mode make[2]: *** [avrdude-main.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [avrdude-term.o] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_cross_avrdude/avrdude/work/avrdude-7.0' make[1]: *** [all-recursive] Error 1
Change History (4)
comment:1 follow-up: 3 Changed 22 months ago by barracuda156
comment:2 Changed 22 months ago by barracuda156
Summary: | avrdude fails to build with gcc-4.2: error: ‘for’ loop initial declaration used outside C99 mode → avrdude fails to build with gcc-4.2: error: ‘for’ loop initial declaration used outside C99 mode; error: ‘struct Data’ has no member named ‘ll’ |
---|
comment:3 Changed 22 months ago by jmroot (Joshua Root)
Replying to barracuda156:
This time just passing
-std=c99
fails to help:
That's because the code is using an anonymous union member in a struct, which is a C11 feature.
comment:4 Changed 22 months ago by barracuda156
Owner: | set to barracuda156 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
This time just passing
-std=c99
fails to help: