This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Use of #if DEBUG in reent.h
- From: Freddie Chopin <freddie_chopin at op dot pl>
- To: Joe Seymour <joe dot s at somniumtech dot com>, newlib at sourceware dot org
- Date: Wed, 04 Jan 2017 11:14:04 +0100
- Subject: Re: Use of #if DEBUG in reent.h
- Authentication-results: sourceware.org; auth=none
- References: <4f36fc7b-ea55-8b4a-e786-e28d7dcc23e0@somniumtech.com>
Hi!
Maybe it would be ok to change the offending line to:
#if defined(DEBUG) && DEBUG != 0
This way the old behaviour should be retained in most of the cases.
>From what I've read, if you add "-DDEBUG" to GCC flags, it is
equivalent to "-DDEBUG=1". I also think that any undefined macro in a
"#if whatever" statement is considered to be 0, but this is also only a
GCC extensions.
Regards,
FCh