Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > good compile options for g++ options to enforce good coding

Reply
Thread Tools

good compile options for g++ options to enforce good coding

 
 
Cliff Martin
Guest
Posts: n/a
 
      01-31-2007
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

 
Reply With Quote
 
 
 
 
Larry Smith
Guest
Posts: n/a
 
      01-31-2007
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++...
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cant compile on linux system.cant compile on cant compile onlinux system. Nagaraj C++ 1 03-01-2007 11:18 AM
Windows Vista to enforce region coding? Philip NZ Computing 4 09-01-2006 11:46 AM
general coding issues - coding style... calmar Python 11 02-21-2006 10:36 AM
Using templates to enforce compile-time bounds checking Dave Rahardja C++ 4 11-21-2005 01:19 PM
Can Thunderbird or Mozilla enforce same message rule Big Craigie Firefox 3 03-01-2005 12:43 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57