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


Fergus Henderson wrote:-

> Will
> 
> 	#pragma GCC poison rindex
> 	#define strrchr rindex
> 	strrchr(some_string, 'h');
> 
> produce an error?  IMHO the documentation is not clear about that.

Yes.  The simple rule is "if a poisoned identifier appears in the source
file (after escaped-newline removal, but before macro expansion) after
being poisoned, it is warned about.  The only exception is if it appears
in the RHS of another #pragma poison directive, in which case it is
silently ignored."

Neil.


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