aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppmacro.c
diff options
context:
space:
mode:
authorNeil Booth <neilb@earthling.net>2000-11-15 19:25:22 +0000
committerNeil Booth <neil@gcc.gnu.org>2000-11-15 19:25:22 +0000
commitfe6c2db99ac5011f3b3fc22ee86e0502538bb7e9 (patch)
treec0d3e0b141751cde227115dc9b911f8e8050ca84 /gcc/cppmacro.c
parentcbc2c182d1de2ffc2f5f15db9b96fd0c3dafe815 (diff)
downloadgcc-fe6c2db99ac5011f3b3fc22ee86e0502538bb7e9.zip
gcc-fe6c2db99ac5011f3b3fc22ee86e0502538bb7e9.tar.gz
gcc-fe6c2db99ac5011f3b3fc22ee86e0502538bb7e9.tar.bz2
cpplib.c (start_directive, [...]): New functions.
* cpplib.c (start_directive, end_directive): New functions. (_cpp_handle_directive, run_directive): Use them. (_cpp_handle_directive): Don't -Wtraditional on indented null directives. (_cpp_push_buffer): Don't re-clear was_skipping. * cpplib.h (struct cpp_reader): New member la_saved. * cppmacro.c (cpp_get_token): Don't interpret _Pragma in directives. From-SVN: r37487
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r--gcc/cppmacro.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index 35ecc4d..fcaa7c6 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -959,7 +959,10 @@ cpp_get_token (pfile, token)
continue;
}
- if (token->val.node != pfile->spec_nodes.n__Pragma)
+ /* Don't interpret _Pragma within directives. The standard is
+ not clear on this, but to me this makes most sense. */
+ if (token->val.node != pfile->spec_nodes.n__Pragma
+ || pfile->state.in_directive)
break;
/* Handle it, and loop back for another token. MI is cleared