sudar/Arduino-Makefile — pull request #234 by ladislas (2014-08-12 22:13:09+00:00)
Title: CFLAGS_STD and CPPFLAGS_STD

This is the new pull request regarding the `XFLAGS_STD` and is a follow up of the https://github.com/sudar/Arduino-Makefile/pull/233 pull request.

**Nothing is set yet, modifications are welcome and I'll clean everything once everything is decided**

The description below should answers @sej7278's questions from https://github.com/sudar/Arduino-Makefile/pull/233#issuecomment-51969811. **All the tests are made with the binaries shipped with the Arduino IDE.**

## STD flags

The default `CFLAGS_STD` is `-std=gnu99` and **has not changed**.

Regarding the default `CPPFLAGS_STD`, there seems to be different options :

- `undefined` - left blank - code ***does*** compile :+1:
- `-std=gnu++98` - [1998 standard](https://gcc.gnu.org/onlinedocs/gcc/Standards.html) - code ***does*** compile :+1:
- `-std=gnu++03` - [2003 amendment](https://gcc.gnu.org/onlinedocs/gcc/Standards.html) - code **does not** compile, option not recognized :-1:
- `-std=gnu++11` - [2011 standard](https://gcc.gnu.org/projects/cxx0x.html) - code **does not** compiles, option not recognized because `avr-gcc 4.7` or higher is needed :-1:
- `-std=gnu++0x` - [2011 standard](https://gcc.gnu.org/projects/cxx0x.html) - code ***does*** compile, because the option is compatible with `avr-gcc 4.3.2` shipped with the Arduino IDE :+1:

***Conclusion:*** `undefined` works and only relies on the Arduino binaries, so it might be the safest choice. On the other hand `gnu++0x` works as well and gives more freedom regarding comments and code. And as the next version of the IDE will ship with `avr-gcc 4.8`, it might be progressive choice. **The discussion is open**.

## EXTRA flags

They have been removed be I can add them back if needed. I don't think they are useful, there is no documentation about them and the names are misleading I think.

## Documentation

I'll add everything once we are set up.

## Conclusion

Feedbacks are more than welcome! :)