]> gcc.gnu.org Git - gcc.git/blobdiff - libcpp/macro.cc
Revert "aarch64: Make existing V2HF be usable."
[gcc.git] / libcpp / macro.cc
index 65b7a1cf80b798e3411b72d62b12e5f85b316bfb..452e14a1e66ab5d7f8c150e1a13f1111c6b112be 100644 (file)
@@ -563,7 +563,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node,
            if (!name)
              abort ();
          }
-       if (pfile->cb.remap_filename)
+       if (pfile->cb.remap_filename && !pfile->state.in_directive)
          name = pfile->cb.remap_filename (name);
        len = strlen (name);
        buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
@@ -1093,7 +1093,7 @@ _cpp_arguments_ok (cpp_reader *pfile, cpp_macro *macro, const cpp_hashnode *node
 
   if (argc < macro->paramc)
     {
-      /* In C++20 (here the va_opt flag is used), and also as a GNU
+      /* In C++20 and C2X (here the va_opt flag is used), and also as a GNU
         extension, variadic arguments are allowed to not appear in
         the invocation at all.
         e.g. #define debug(format, args...) something
@@ -1373,8 +1373,11 @@ funlike_invocation_p (cpp_reader *pfile, cpp_hashnode *node,
       token = cpp_get_token (pfile);
       if (token->type != CPP_PADDING)
        break;
+      gcc_assert ((token->flags & PREV_WHITE) == 0);
       if (padding == NULL
-         || (!(padding->flags & PREV_WHITE) && token->val.source == NULL))
+         || padding->val.source == NULL
+         || (!(padding->val.source->flags & PREV_WHITE)
+             && token->val.source == NULL))
        padding = token;
     }
 
This page took 0.027023 seconds and 5 git commands to generate.