https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65238

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Mar 23 08:02:39 2015
New Revision: 221587

URL: https://gcc.gnu.org/viewcvs?rev=221587&root=gcc&view=rev
Log:
    PR preprocessor/65238
    * internal.h (_cpp_scan_out_logical_line): Add third argument.
    * directives.c (prepare_directive_trad): Pass false to it.
    * traditional.c (_cpp_read_logical_line_trad,
    _cpp_create_trad_definition): Likewise.
    (struct fun_macro): Add paramc field.
    (fun_like_macro): New function.
    (maybe_start_funlike): Handle NODE_BUILTIN macros.  Initialize
    macro->paramc field.
    (save_argument): Use macro->paramc instead of
    macro->node->value.macro->paramc.
    (push_replacement_text): Formatting fix.
    (recursive_macro): Use fun_like_macro helper.
    (_cpp_scan_out_logical_line): Likewise.  Add BUILTIN_MACRO_ARG
    argument.  Initialize fmacro.paramc field.  Handle builtin
    function-like macros.

    * c-c++-common/cpp/pr65238-1.c: New test.
    * gcc.dg/cpp/pr65238-2.c: New test.
    * gcc.dg/cpp/trad/pr65238-3.c: New test.
    * gcc.dg/cpp/trad/pr65238-4.c: New test.

Added:
    trunk/gcc/testsuite/c-c++-common/cpp/pr65238-1.c
    trunk/gcc/testsuite/gcc.dg/cpp/pr65238-2.c
    trunk/gcc/testsuite/gcc.dg/cpp/trad/pr65238-3.c
    trunk/gcc/testsuite/gcc.dg/cpp/trad/pr65238-4.c
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/libcpp/ChangeLog
    trunk/libcpp/directives.c
    trunk/libcpp/internal.h
    trunk/libcpp/traditional.c

Reply via email to