This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: allow plugins to disable poison



While I don't disagree with this change in principle, I think malloc
and realloc should be the only poisonings disabled. Also, it would be
nice if this was done automatically for all plugins, for example by
doing in gcc-plugin.h
I disagree. GCC poisons a lot of identifiers and the risk of collisions
with other headers is fairly high.

You're right in that these could also be left aside


 #pragma GCC poison calloc strdup
 #pragma GCC poison ANSI_PROTOTYPES PTR_CONST LONG_DOUBLE VPARAMS VA_OPEN \
  VA_FIXEDARG VA_CLOSE VA_START
 #pragma GCC poison bcopy bzero bcmp rindex

(together with the #undef that they follow), but not the eliminated parts of the GCC API. This may be moot now, but not as soon as plugins will have been part of GCC for a few versions.

Paolo


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