Whether macros are defined:

__FILE__, __LINE__, __PRETTY_FUNCTION__ 

at release build?

UPD Compiler GCCv4.4.3, IDE QtCreator

  • @ASten; For a correct answer, specify the version of the compiler, as well as the version of the development environment. - Nicolas Chabanovsky

2 answers 2

Yes, macros are defined regardless of the type of assembly. You can check it up simply by adding a view call.

 printf ("File is %s. Line is %d.", __FILE__, __LINE__); 

    And try? This is absolutely not difficult.

    But from my experience I will say - yes, they are determined, since they do not depend on the type of assembly and are substituted by the preprocessor at the initial stages.

    • Yes, I tried it, it worked for me, I just wanted to be sure that it would work on other machines with a different operating system and, possibly, another compiler. Thanks for the clarification about the preprocessor! - ASten
    • With another compiler? Well then there is a little catch. Visual __PRETTY_FUNCTION__ does not define __PRETTY_FUNCTION__ . Read this , I think you will find the appropriate answers. - KoVadim