avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-libc-dev] [RFC] Conditional poisoning of deprecated items


From: Weddington, Eric
Subject: RE: [avr-libc-dev] [RFC] Conditional poisoning of deprecated items
Date: Mon, 28 Feb 2011 20:01:42 -0700


> -----Original Message-----
> From: John Myers [mailto:address@hidden
> Sent: Monday, February 28, 2011 7:17 PM
> To: Weddington, Eric
> Cc: address@hidden
> Subject: Re: [avr-libc-dev] [RFC] Conditional poisoning of deprecated
> items
> 
> 
> The system header pragma suppresses the warnings.
> 
> 
> #pragma GCC system_header
> #define xyz 3
> 
> 
> #pragma GCC poison xyz
> 

Thanks for finding that, John! Yes, it looks like that could work. It looks 
like it would have some other side-effects, however, the documentation says 
that it only affects the code that comes after that pragmas. So we could 
implement this by putting the poisoning of symbols at the bottom of a header 
file (e.g. at the bottom of an I/O header file, with the pragmas system_header 
just right before the poisoning.

We could then have it default on, with a conditional compilation symbol to turn 
OFF the poisoning of deprecated items.

For example:

------------------------------
// I/O header file

// A bunch of defined stuff...

#if !defined(__AVR_LIBC_DEPRECATED_ENABLE__)
#pragma GCC system_header
#pragma GCC poison abc
// Poisoned definitions.
#pragma GCC poison xyz
#endif
------------------------------

How does that sound?

Joerg, do you have any objections to this implementation?

Eric Weddington



reply via email to

[Prev in Thread] Current Thread [Next in Thread]