aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcclibs/libcpp/directives.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcclibs/libcpp/directives.c')
-rw-r--r--contrib/gcclibs/libcpp/directives.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/gcclibs/libcpp/directives.c b/contrib/gcclibs/libcpp/directives.c
index 7fb142e48c79..70118428e2e0 100644
--- a/contrib/gcclibs/libcpp/directives.c
+++ b/contrib/gcclibs/libcpp/directives.c
@@ -423,8 +423,13 @@ _cpp_handle_directive (cpp_reader *pfile, int indented)
does not cause '#define foo bar' to get executed when
compiled with -save-temps, we recognize directives in
-fpreprocessed mode only if the # is in column 1. macro.c
- puts a space in front of any '#' at the start of a macro. */
+ puts a space in front of any '#' at the start of a macro.
+
+ We exclude the -fdirectives-only case because macro expansion
+ has not been performed yet, and block comments can cause spaces
+ to preceed the directive. */
if (CPP_OPTION (pfile, preprocessed)
+ && !CPP_OPTION (pfile, directives_only)
&& (indented || !(dir->flags & IN_I)))
{
skip = 0;