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

            Bug ID: 97932
           Summary: Preprocessor, generated error dumps most of the source
                    file, not just one line.
           Product: gcc
           Version: 8.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lance.delahaye at gmail dot com
  Target Milestone: ---

Created attachment 49608
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49608&action=edit
Minimal source (too many comments maybe) but no #includes needed.

When error generated originating expanding #define, entire source between line
of  #define and the line invoking the macro is listed as error line. Can be
hundreds of lines, most of the source file.

Verified on 6.3 and 8.2, not tried most recent.

Attached source .c file, no #include dependancies.

To reproduce:

gcc -C _gcc_container_of_bug.c

gcc --version 
gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.

Reply via email to