aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index cdfdaa3..5375d2b 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -568,7 +568,15 @@ handle_directive (pfile)
}
CPP_SET_WRITTEN (pfile, old_written);
- (*kt->func) (pfile, kt);
+
+ if (pfile->no_directives)
+ {
+ cpp_error (pfile, "`#%s' may not be used inside a macro argument",
+ kt->name);
+ skip_rest_of_line (pfile);
+ }
+ else
+ (*kt->func) (pfile, kt);
return 1;
}