diff options
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r-- | gcc/cpplib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c index 91f86b7..02a9318 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -1705,11 +1705,12 @@ do_pragma_implementation (pfile) return 1; } + /* Trim the leading and trailing quote marks from the string. */ name = pfile->token_buffer + written + 1; - len = strlen (name); + len = CPP_PWRITTEN (pfile) - name; copy = (U_CHAR *) alloca (len); memcpy (copy, name, len - 1); - copy[len] = '\0'; /* trim trailing quote */ + copy[len - 1] = '\0'; if (cpp_included (pfile, copy)) cpp_warning (pfile, |