This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Projects for beginners
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: Projects for beginners
- From: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Date: Tue, 13 Mar 2001 15:09:40 +1100
- Cc: gcc at gcc dot gnu dot org
- References: <200103130402.XAA26898@caip.rutgers.edu>
On 12-Mar-2001, Kaveh R. Ghazi <ghazi@caip.rutgers.edu> wrote:
> +Note, if the poisoned identifier appears through the result of macro
> +expansion it @emph{won't} cause an error. So if you poison an
> +identifier you need not worry about system headers defining macros that
> +use it.
> +
> +For example,
> +
> +@example
> +#define strrchr rindex
> +#pragma GCC poison rindex
> +strrchr(some_string, 'h');
> +@end example
> +
> +@noindent
> +will not produce an error.
Will
#pragma GCC poison rindex
#define strrchr rindex
strrchr(some_string, 'h');
produce an error? IMHO the documentation is not clear about that.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.