On Wed, Jun 1, 2022 at 1:16 PM Kay Diederichs <kay.diederi...@uni-konstanz.de> wrote: > If -g is used, the executable _always_ has version and option info
Well, isn't that the answer to your question then? As an alternative approach, make a command-line option (say, "-v") that prints the version number of the program, name of the author and other pertinent information, as well as the output of compiler_version() and compiler_options(), and then exits. That would ensure that those calls won't be optimized away. -- Janne Blomqvist