Abdellazizhammami / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

Compile with -pedantic #777

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Re-opening bug #702 (by entering new, unless I'm missing it google can't 
reopen).

Bug #702 was merged into bug #664 as duplicate, but it is not a duplicate. #664 
adds compiling with -Wall when verbose is turned on.
Bug #702 was about adding -pedantic. 

Consider adding -Wextra as well.

Arduino 1.0.

Original issue reported on code.google.com by gooc...@top.geek.nz on 7 Jan 2012 at 3:16

GoogleCodeExporter commented 8 years ago
The version of avr-gcc used on Windows and Mac, and many Linux systems (eg, 
Ubuntu 10.10) has a known bug where PROGMEM used in C++ within statically 
initialized arrays causes a false warning.

Using -pedantic would turn this annoying but harmless warning into a fatal 
error.  That's a pretty terrible compatibility problem.

Original comment by paul.sto...@gmail.com on 8 Jan 2012 at 7:56

GoogleCodeExporter commented 8 years ago
I agree, I don't think we should enable compiler options that will turn 
warnings into errors.  Showing the warnings should be sufficient, in my opinion.

Original comment by dmel...@gmail.com on 9 Jan 2012 at 8:42

GoogleCodeExporter commented 8 years ago
That's why you make it optional. Newer gcc versions don't have this problem. 
And just because the Arduino sources can't be compiled with more stringent 
warning options shoudln't force me to do the same with all my software. Those 
warnings are there for a reason.

Original comment by gooc...@top.geek.nz on 9 Jan 2012 at 8:49

GoogleCodeExporter commented 8 years ago
I'm going to leave this as "won't fix" because I don't think we should add an 
option specifically to enable this compiler option.  Instead, it should be 
something that's possible with a more general ability to modify the compiler 
arguments, e.g. issue 421.

Original comment by dmel...@gmail.com on 9 Jan 2012 at 8:55

GoogleCodeExporter commented 8 years ago
Sure, #421 would be much better.

Original comment by gooc...@top.geek.nz on 9 Jan 2012 at 9:01