What are the differences between -std = c++11 and -std = gnu++11?

GNU C++ compiler, g++, provides extensions to the C++ language. The difference between the two options is whether these GNU extensions that might violate the C++ standard are enabled or not. Note that some extensions can still be in effect when using -std = c++11, if they don't violate the standard.

The list of extensions to the C++ language in GNU compiler can be found here − https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Extensions.html

Updated on: 24-Jun-2020

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started