This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Projects for beginners


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]