Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   good compile options for g++ options to enforce good coding (http://www.velocityreviews.com/forums/t460164-good-compile-options-for-g-options-to-enforce-good-coding.html)

Cliff Martin 01-31-2007 01:54 AM

good compile options for g++ options to enforce good coding
 
I would like to write code in the most platform independent and
correct way possible, and would like to use compiler options to help
enforce this. In C I would use

gcc -Wall -ansi -pedantic -O1

Is it the same for C++? Any options I should include?

--
Cliff


Larry Smith 01-31-2007 02:03 AM

Re: good compile options for g++ options to enforce good coding
 
Cliff Martin wrote:
> I would like to write code in the most platform independent and
> correct way possible, and would like to use compiler options to help
> enforce this. In C I would use
>
> gcc -Wall -ansi -pedantic -O1
>
> Is it the same for C++? Any options I should include?
>
> --
> Cliff
>


Try the g++ newsgroup

gnu.g++.help

The same options apply to the GCC C++ compiler, g++.

g++ -Wall -ansi -pedantic -O1

However, there are many more for both gcc & g++...


All times are GMT. The time now is 04:41 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.