> -----Original Message----- > From: John Myers [mailto:atomicdog....@gmail.com] > Sent: Monday, February 28, 2011 7:17 PM > To: Weddington, Eric > Cc: avr-libc-dev@nongnu.org > 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 _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev