detect --coverage option from code

Raul Benet Raul.Benet@lightblueoptics.com
Mon Mar 13 14:09:00 GMT 2017


I actually wouldn't, just wrote it there without giving it much thought, and just to make it visibly separate from the "-D" for easier reading.
Thanks,
Raul.

-----Original Message-----
From: Jonathan Wakely [mailto:jwakely.gcc@gmail.com] 
Sent: 13 March 2017 12:42
To: Raul Benet <Raul.Benet@lightblueoptics.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: detect --coverage option from code

On 13 March 2017 at 11:57, Raul Benet wrote:
> (I know I could just add a -D__MY_COVERAGE_DFINE to my compilation 
> options = when doing "-coverage" but that makes the source code less 
> maintainable)

And is undefined behaviour because __MY_COVERAGE_DFINE is a reserved name. Why would you add underscores to the start?


More information about the Gcc-help mailing list