* [PATCH] Fix AVR fallout
@ 2012-08-17 20:40 Jan-Benedict Glaw
2012-08-19 6:20 ` Denis Chertykov
0 siblings, 1 reply; 5+ messages in thread
From: Jan-Benedict Glaw @ 2012-08-17 20:40 UTC (permalink / raw)
To: Denis Chertykov, Anatoly Sokolov, Eric Weddington; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 6519 bytes --]
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.
diff --git a/gcc/config/avr/avr-log.c b/gcc/config/avr/avr-log.c
index f054bb5..f86165d 100644
--- a/gcc/config/avr/avr-log.c
+++ b/gcc/config/avr/avr-log.c
@@ -284,15 +284,15 @@ avr_log_vadump (FILE *file, const char *fmt, va_list ap)
break;
case 'm':
- fputs (GET_MODE_NAME (va_arg (ap, enum machine_mode)), file);
+ fputs (GET_MODE_NAME ((enum machine_mode) va_arg (ap, int)), file);
break;
case 'C':
- fputs (rtx_name[va_arg (ap, enum rtx_code)], file);
+ fputs (rtx_name[va_arg (ap, int)], file);
break;
case 'R':
- fputs (reg_class_names[va_arg (ap, enum reg_class)], file);
+ fputs (reg_class_names[va_arg (ap, int)], file);
break;
case 'F':
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 48fd495..0ce0af4 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -95,7 +95,7 @@ struct mcu_type_s {
const char *const name;
/* Index in avr_arch_types[]. */
- int arch;
+ enum avr_arch arch;
/* Must lie outside user's namespace. NULL == no macro. */
const char *const macro;
diff --git a/gcc/config/avr/gen-avr-mmcu-texi.c b/gcc/config/avr/gen-avr-mmcu-texi.c
index b5cb3c4..f4cb24e 100644
--- a/gcc/config/avr/gen-avr-mmcu-texi.c
+++ b/gcc/config/avr/gen-avr-mmcu-texi.c
@@ -50,7 +50,7 @@ print_mcus (size_t n_mcus)
int main (void)
{
- enum avr_arch arch = 0;
+ enum avr_arch arch = ARCH_UNKNOWN;
size_t i, n_mcus = 0;
const struct mcu_type_s *mcu;
--
Jan-Benedict Glaw jbglaw@lug-owl.de +49-172-7608481
Signature of: Warum ist Scheiße braun? ...weil braun schon immer scheiße ist!
the second :
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix AVR fallout
2012-08-17 20:40 [PATCH] Fix AVR fallout Jan-Benedict Glaw
@ 2012-08-19 6:20 ` Denis Chertykov
2012-08-19 8:34 ` [PATCH, Committed] Fix ChangeLog (was: [PATCH] Fix AVR fallout) Jan-Benedict Glaw
0 siblings, 1 reply; 5+ messages in thread
From: Denis Chertykov @ 2012-08-19 6:20 UTC (permalink / raw)
To: Jan-Benedict Glaw; +Cc: Anatoly Sokolov, Eric Weddington, gcc-patches
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH, Committed] Fix ChangeLog (was: [PATCH] Fix AVR fallout)
2012-08-19 6:20 ` Denis Chertykov
@ 2012-08-19 8:34 ` Jan-Benedict Glaw
2012-08-19 18:59 ` Ian Lance Taylor
0 siblings, 1 reply; 5+ messages in thread
From: Jan-Benedict Glaw @ 2012-08-19 8:34 UTC (permalink / raw)
To: Denis Chertykov; +Cc: Anatoly Sokolov, Eric Weddington, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1640 bytes --]
On Sun, 2012-08-19 10:19:37 +0400, Denis Chertykov <chertykov@gmail.com> wrote:
> 2012/8/18 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.
I fixed ChangeLog's whitespace (probably cut'n'paste error), committed
as obvious.
2012-08-19 Jan-Benedict Glaw <jbglaw@lug-owl.de>
* ChangeLog: Fix whitespace.
Index: ChangeLog
===================================================================
--- ChangeLog (revision 190511)
+++ ChangeLog (working copy)
@@ -5,11 +5,11 @@
2012-08-18 Jan-Benedict Glaw <jbglaw@lug-owl.de>
- * 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.
+ * 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.
2012-08-18 Jan Hubicka <jh@suse.cz>
--
Jan-Benedict Glaw jbglaw@lug-owl.de +49-172-7608481
Signature of: Zensur im Internet? Nein danke!
the second :
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH, Committed] Fix ChangeLog (was: [PATCH] Fix AVR fallout)
2012-08-19 8:34 ` [PATCH, Committed] Fix ChangeLog (was: [PATCH] Fix AVR fallout) Jan-Benedict Glaw
@ 2012-08-19 18:59 ` Ian Lance Taylor
2012-08-19 19:16 ` Jan-Benedict Glaw
0 siblings, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2012-08-19 18:59 UTC (permalink / raw)
To: Jan-Benedict Glaw
Cc: Denis Chertykov, Anatoly Sokolov, Eric Weddington, gcc-patches
On Sun, Aug 19, 2012 at 1:34 AM, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> I fixed ChangeLog's whitespace (probably cut'n'paste error), committed
> as obvious.
>
> 2012-08-19 Jan-Benedict Glaw <jbglaw@lug-owl.de>
>
> * ChangeLog: Fix whitespace.
Note that fixes to the ChangeLog files do not themselves get ChangeLog entries.
Ian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH, Committed] Fix ChangeLog (was: [PATCH] Fix AVR fallout)
2012-08-19 18:59 ` Ian Lance Taylor
@ 2012-08-19 19:16 ` Jan-Benedict Glaw
0 siblings, 0 replies; 5+ messages in thread
From: Jan-Benedict Glaw @ 2012-08-19 19:16 UTC (permalink / raw)
To: Ian Lance Taylor
Cc: Denis Chertykov, Anatoly Sokolov, Eric Weddington, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 665 bytes --]
On Sun, 2012-08-19 11:58:49 -0700, Ian Lance Taylor <iant@google.com> wrote:
> On Sun, Aug 19, 2012 at 1:34 AM, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> > I fixed ChangeLog's whitespace (probably cut'n'paste error), committed
> > as obvious.
> >
> > 2012-08-19 Jan-Benedict Glaw <jbglaw@lug-owl.de>
> >
> > * ChangeLog: Fix whitespace.
>
> Note that fixes to the ChangeLog files do not themselves get
> ChangeLog entries.
Fixed.
Thanks for the notice, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de +49-172-7608481
Signature of: http://perl.plover.com/Questions.html
the second :
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-19 19:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-17 20:40 [PATCH] Fix AVR fallout Jan-Benedict Glaw
2012-08-19 6:20 ` Denis Chertykov
2012-08-19 8:34 ` [PATCH, Committed] Fix ChangeLog (was: [PATCH] Fix AVR fallout) Jan-Benedict Glaw
2012-08-19 18:59 ` Ian Lance Taylor
2012-08-19 19:16 ` Jan-Benedict Glaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).