You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some non conformance related issues for different compilers, which is most notable with respect to designated initializers. These are a C++20 feature but have been supported in compilers for a long time, even in C++17 mode.
This means that you can write code in GCC that will compile and run correctly due to non standard conformance, but msvc will refuse to compile the same code due to stricter conformance rules.
For the future we should move to adding pedantic warnings (or even as errors).
On GCC this is either -Wpedantic or -Werror=pedantic. On MSVC this should be /permissive- . This should be platform portable though.
The text was updated successfully, but these errors were encountered:
Another feature that should be prohibited in the future are variable length arrays under gcc, even though noone should be using them in the first place (-Werror=vla)
There are some non conformance related issues for different compilers, which is most notable with respect to designated initializers. These are a C++20 feature but have been supported in compilers for a long time, even in C++17 mode.
This means that you can write code in GCC that will compile and run correctly due to non standard conformance, but msvc will refuse to compile the same code due to stricter conformance rules.
For the future we should move to adding pedantic warnings (or even as errors).
On GCC this is either
-Wpedantic
or-Werror=pedantic
. On MSVC this should be/permissive-
. This should be platform portable though.The text was updated successfully, but these errors were encountered: