Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommended warning flags at O2 optimization level in gcc-4.8.1 [closed]

I have recently moved from gcc-4.2.4 to gcc-4.8.1. What are the recommended gcc warning options at O2 optimization level in gcc-4.8.1?

I have been using following warning flags in gcc-4.2.4: -Wall -Wno-parentheses -Wpointer-arith -Wcast-align -Wsign-compare -Wnon-virtual-dtor -Wnon-template-friend -Woverloaded-virtual -Wsign-promo

like image 843
RYUZAKI Avatar asked Dec 22 '25 13:12

RYUZAKI


1 Answers

The convention I promote is:

-Wall -Wextra -pedantic

Visit the GCC documentation for details on which specific flags this turns on.

like image 79
Lightness Races in Orbit Avatar answered Dec 24 '25 04:12

Lightness Races in Orbit



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!