mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-10 14:47:27 +08:00
* cpp.texi (poison): Explain the macro expansion exception.
From-SVN: r40438
This commit is contained in:
parent
e5408e5240
commit
bf4ab28167
@ -1,3 +1,7 @@
|
||||
2001-03-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* cpp.texi (poison): Explain the macro expansion exception.
|
||||
|
||||
2001-03-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* expr.c (store_expr): Add dont_store_target. If temp is already in
|
||||
|
16
gcc/cpp.texi
16
gcc/cpp.texi
@ -1601,6 +1601,22 @@ sprintf(some_string, "hello");
|
||||
@noindent
|
||||
will produce an error.
|
||||
|
||||
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.
|
||||
|
||||
@node Macro Pitfalls,, Poisoning, Macros
|
||||
@subsection Pitfalls and Subtleties of Macros
|
||||
@cindex problems with macros
|
||||
|
Loading…
Reference in New Issue
Block a user