Does gcc define anything when -g is specified?

前端 未结 3 1250
忘掉有多难
忘掉有多难 2020-12-14 05:25

Shortly, I want to know if gcc (or g++. I need it in C, but also am curious about c++) defines any special symbols if -g is enabled. Does it? I

3条回答
  •  旧巷少年郎
    2020-12-14 06:16

    Running
    g++ -E -dD -xc++ /dev/null
    vs.
    g++ -E -dD -g -xc++ /dev/null
    shows me no extra defined symbols.

    That, combined with the lack of any documentation stating that symbols get defined, should be enough to safely say that nothing gets defined.

提交回复
热议问题