Author Topic: How to dump all predefined symbols known to the compiler?  (Read 4063 times)

ilikejello

  • Guest
How to dump all predefined symbols known to the compiler?
« on: August 12, 2014, 09:09:32 pm »
Hello guys, I am relatively new to programming (I am a student) and I am wondering how I can dump all the predefined symbols used by the codeblocks (gcc) compiler?

Thank you very much.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: How to dump all predefined symbols known to the compiler?
« Reply #1 on: August 12, 2014, 10:16:22 pm »
Are you talking about the defines? Then you can compile a simple source file and tell the compiler to dump the preprocessed source instead of generating object file.

For gcc I think it is something like: gcc -E main.c or g++ -E main.cpp, but I could be wrong of course, so consult the manual.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3352
Re: How to dump all predefined symbols known to the compiler?
« Reply #2 on: August 12, 2014, 11:15:15 pm »
or you run use the -v option

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: How to dump all predefined symbols known to the compiler?
« Reply #3 on: August 13, 2014, 12:03:53 am »
g++ -dM -E -x c++ /dev/null