This is the mail archive of the gcc-patches@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: [PATCH] Fix AVR fallout


2012/8/18 Jan-Benedict Glaw <jbglaw@lug-owl.de>:
> Hi!
>
> I see these warnings/errors right now:
>
> g++ -c   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../../../gcc/gcc -I../../../../gcc/gcc/. -I../../../../gcc/gcc/../include -I../../../../gcc/gcc/../libcpp/include  -I../../../../gcc/gcc/../libdecnumber -I../../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber    -I. -I. -I../../../../gcc/gcc -I../../../../gcc/gcc/. -I../../../../gcc/gcc/../include -I../../../../gcc/gcc/../libcpp/include  -I../../../../gcc/gcc/../libdecnumber -I../../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber   ../../../../gcc/gcc/config/avr/avr-log.c
> cc1plus: warning: command line option â-Wstrict-prototypesâ is valid for C/ObjC but not for C++ [enabled by default]
> cc1plus: warning: command line option â-Wmissing-prototypesâ is valid for C/ObjC but not for C++ [enabled by default]
> cc1plus: warning: command line option â-Wold-style-definitionâ is valid for C/ObjC but not for C++ [enabled by default]
> cc1plus: warning: command line option â-Wc++-compatâ is valid for C/ObjC but not for C++ [enabled by default]
> ../../../../gcc/gcc/config/avr/avr-log.c: In function âvoid avr_log_vadump(FILE*, const char*, va_list)â:
> ../../../../gcc/gcc/config/avr/avr-log.c:287:22: warning: âmachine_modeâ is promoted to âintâ when passed through â...â [enabled by default]
> ../../../../gcc/gcc/config/avr/avr-log.c:287:22: note: (so you should pass âintâ not âmachine_modeâ to âva_argâ)
> ../../../../gcc/gcc/config/avr/avr-log.c:287:22: note: if this code is reached, the program will abort
> ../../../../gcc/gcc/config/avr/avr-log.c:291:31: warning: ârtx_codeâ is promoted to âintâ when passed through â...â [enabled by default]
> ../../../../gcc/gcc/config/avr/avr-log.c:291:31: note: if this code is reached, the program will abort
> ../../../../gcc/gcc/config/avr/avr-log.c:295:38: warning: âreg_classâ is promoted to âintâ when passed through â...â [enabled by default]
> ../../../../gcc/gcc/config/avr/avr-log.c:295:38: note: if this code is reached, the program will abort
>
> [...]
>
> g++   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../../../gcc/gcc -I../../../../gcc/gcc/. -I../../../../gcc/gcc/../include -I../../../../gcc/gcc/../libcpp/include  -I../../../../gcc/gcc/../libdecnumber -I../../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber    -I. -I. -I../../../../gcc/gcc -I../../../../gcc/gcc/. -I../../../../gcc/gcc/../include -I../../../../gcc/gcc/../libcpp/include  -I../../../../gcc/gcc/../libdecnumber -I../../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber   ../../../../gcc/gcc/config/avr/gen-avr-mmcu-texi.c -o gen-avr-mmcu-texi
> cc1plus: warning: command line option â-Wstrict-prototypesâ is valid for C/ObjC but not for C++ [enabled by default]
> cc1plus: warning: command line option â-Wmissing-prototypesâ is valid for C/ObjC but not for C++ [enabled by default]
> cc1plus: warning: command line option â-Wold-style-definitionâ is valid for C/ObjC but not for C++ [enabled by default]
> cc1plus: warning: command line option â-Wc++-compatâ is valid for C/ObjC but not for C++ [enabled by default]
> ../../../../gcc/gcc/config/avr/gen-avr-mmcu-texi.c: In function âint main()â:
> ../../../../gcc/gcc/config/avr/gen-avr-mmcu-texi.c:53:24: error: invalid conversion from âintâ to âavr_archâ [-fpermissive]
> ../../../../gcc/gcc/config/avr/gen-avr-mmcu-texi.c:75:23: error: invalid conversion from âintâ to âavr_archâ [-fpermissive]
> make[3]: *** [gen-avr-mmcu-texi] Error 1
> make[3]: Leaving directory `/mnt/devel/src/linux/build/avr/gcc-stage1/gcc'
> make[2]: *** [all-gcc] Error 2
> make[2]: Leaving directory `/mnt/devel/src/linux/build/avr/gcc-stage1'
>
>
> I suggest this patch. Okay?
>
>
>
> 2012-08-17  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
>
> gcc/Changelog:
>         * config/avr/avr-log.c (avr_log_vadump): Properly use
>         int-promoted enum values.
>         * config/avr/avr.h (struct mcu_type_s): Change `arch' from
>         int to enum avr_arch.
>         * config/avr/gen-avr-mmcu-texi.c (main): Use correct initializer.
>
>

Thank you for the fix.
Committed.

Denis.


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