Bug 61832 - [4.10 Regression] r212638 breaks building ncurses
Summary: [4.10 Regression] r212638 breaks building ncurses
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: preprocessor (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: 5.0
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2014-07-17 17:29 UTC by ktkachov
Modified: 2018-05-20 13:33 UTC (History)
1 user (show)

See Also:
Host:
Target: x86, arm, aarch64
Build:
Known to work: 4.9.1
Known to fail: 4.10.0
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ktkachov 2014-07-17 17:29:44 UTC
As of 212638:

    gcc/c-family/ChangeLog:
        * c-ppoutput.c (struct print::prev_was_system_token): New data
        member.
        (init_pp_output): Initialize it.
        (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
        (do_line_change): Return a flag saying if a line marker was
        emitted or not.
        (scan_translation_unit): Detect if the system-ness of the token we
        are about to emit is different from the one of the previously
        emitted token.  If so, emit a line marker.  Avoid emitting useless
        adjacent line markers.  Avoid emitting line markers for tokens
        originating from the expansion of built-in macros.
        (scan_translation_unit_directives_only): Adjust.

by dodji

gcc fails to build ncurses. Basically the preprocessor ends up generating invalid C-code.

I'll try to reduce a testcase soon, but in the meantime this appears on x86, arm and aarch64 so should be easily reproducible
Comment 1 ktkachov 2014-07-24 08:22:05 UTC
I'm closing this as invalid.
The bug is in the ncurses build process which assumes that the preprocessor does not introduce new lines and mangles the output with its own sed and awk trickery which ends up stumbling on the new chanes