mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-16 03:49:54 +08:00
cpplib.c (do_pragma_poison): Strings in the token buffer are not nul-terminated.
* cpplib.c (do_pragma_poison): Strings in the token buffer are not nul-terminated. From-SVN: r33247
This commit is contained in:
parent
56293c2be2
commit
6a832d4240
@ -1,3 +1,8 @@
|
||||
2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
|
||||
|
||||
* cpplib.c (do_pragma_poison): Strings in the token buffer are
|
||||
not nul-terminated.
|
||||
|
||||
Tue Apr 18 16:04:12 2000 Jim Wilson <wilson@cygnus.com>
|
||||
|
||||
* config/ia64/sysv4.h (SELECT_SECTION): Use data_section if
|
||||
|
@ -1028,14 +1028,14 @@ do_pragma_poison (pfile)
|
||||
}
|
||||
|
||||
p = pfile->token_buffer + written;
|
||||
len = strlen (p);
|
||||
len = CPP_PWRITTEN (pfile) - p;
|
||||
slot = _cpp_lookup_slot (pfile, p, len, INSERT, &hash);
|
||||
if (*slot)
|
||||
{
|
||||
HASHNODE *hp = *slot;
|
||||
if (hp->type != T_POISON)
|
||||
{
|
||||
cpp_warning (pfile, "poisoning existing macro `%s'", p);
|
||||
cpp_warning (pfile, "poisoning existing macro `%s'", hp->name);
|
||||
if (hp->type == T_MACRO)
|
||||
_cpp_free_definition (hp->value.defn);
|
||||
hp->value.defn = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user