Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22113

The difference between -pedantic-errors and -Werror=pedantic in gcc

$
0
0

What is the difference between using -pedantic-errors and -Werror=pedantic in gcc?

According to the documentation of GCC there is a difference:

-pedantic-errors

Give an error whenever the base standard (see -Wpedantic) requires a diagnostic, in some cases where there is undefined behavior at compile-time and in some other cases that do not prevent compilation of programs that are valid according to the standard. This is not equivalent to -Werror=pedantic, since there are errors enabled by this option and not enabled by the latter and vice versa.

What errors are included by -pedantic-errors, but not by -Werror=pedantic?

What errors are included by -Werror=pedantic, but not by -pedantic-errors?

Any example of both types of errors?


Viewing all articles
Browse latest Browse all 22113

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>