Thread: gcc Wall versus pedantic

  1. #1
    Registered User Bajanine's Avatar
    Join Date
    Dec 2001
    Location
    The most peaks over 10,000 feet!
    Posts
    396

    gcc Wall versus pedantic

    When using gcc or g++ I am a little confused at what the exact differece between: -Wall, -pedantic and -ansi options actually are?

    Also, what is the differece between ISO and ANSI standard? I know this could be a real BIG question, but a real basic explaination would be greatly appreciated.
    Favorite Quote:

    >For that reason someone invented C++.
    BLASPHEMY! Begone from my C board, you foul lover of objects, before the gods of C cast you into the void as punishment for your weakness! There is no penance for saying such things in my presence. You are henceforth excommunicated. Never return to this house, filthy heretic!



  2. #2
    ---
    Join Date
    May 2004
    Posts
    1,379
    Wall shows all the warnings. pedantic will be pedantic and will not compile.
    That's probably not the best explanation.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    > -Wall
    Turns on a whole bunch of warnings

    > -ansi
    Turns on all the ANSI diagnostics that GNU agree with, and turns off all the GNU-ism's

    > -pedantic
    Turns on more ANSI diagnostics which GNU doesn't necessarily agree with. Occasionally useful, but also for language lawyers to argue over

    > what is the differece between ISO and ANSI standard?
    Price - copies of the ISO standard are much more pricey than the ANSI standard.
    Other than that there is no technical difference between the two, though you should really refer to the ISO standard since it is the international version.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. gcc -Wall -pedantic
    By flexo87 in forum C Programming
    Replies: 5
    Last Post: 01-26-2009, 02:04 PM
  2. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  3. GCC 4.02 versus 4.2- Speed Increase?
    By DarrenSeth in forum Linux Programming
    Replies: 1
    Last Post: 07-02-2007, 01:19 PM
  4. Compiles on gcc 3.3 but not on gcc 4.0.3
    By cunnus88 in forum C++ Programming
    Replies: 5
    Last Post: 03-29-2007, 12:24 PM
  5. gcc
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 21
    Last Post: 10-22-2003, 03:46 PM