Thread: GCC -g vs -g3 Flag: What is the Difference?

  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    8

    GCC -g vs -g3 Flag: What is the Difference?

    When compiling C source code with either gcc or Clang, I always use the -g flag to generate debugging information for gdb.

    gcc -g -o helloworld helloworld.c

    I noticed that some people recommend -g3 instead. What is the difference between the -g and -g3flags? Also is there a difference between -g and -ggdb?

  2. #2

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. flag condition
    By begginer in forum C Programming
    Replies: 1
    Last Post: 02-22-2011, 05:48 PM
  2. /gs flag
    By mystic-d in forum Tech Board
    Replies: 5
    Last Post: 01-20-2007, 04:38 AM
  3. why is the flag being set to fail
    By mackol in forum C++ Programming
    Replies: 4
    Last Post: 04-17-2003, 11:50 PM
  4. Looking for a gcc flag
    By JLWinsett in forum Linux Programming
    Replies: 4
    Last Post: 12-26-2002, 11:39 AM
  5. White flag is out
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 11-16-2001, 07:13 PM