Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buggy cpp in gcc version 6 #115

Closed
wants to merge 2 commits into from

Conversation

afbjorklund
Copy link
Contributor

This is an updated/corrected fix, for #96.

The preprocessor in later gcc versions is buggy,
returning extra lines and different "line numbers":

    # 1 "<built-in>"
    # 1 "<command-line>"
    # 31 "<command-line>"
    # 1 "/usr/include/stdc-predef.h" 1 3 4
    # 32 "<command-line>" 2

But it only does this when there are no macros,
otherwise (with -D) it returns the regular output:

    # 1 "<built-in>"
    # 1 "<command-line>"
    # 1 "/usr/include/stdc-predef.h" 1 3 4
    # 1 "<command-line>" 2
Turns out that 3.2-maint hashes preprocessor output a bit differently,
so the workaround for skipping certain lines was broken in backport.
When skipping the "extra line", the trailing quotes were missing from
the output causing the hash to be different from the normal output.
@afbjorklund
Copy link
Contributor Author

Fixes #113.

@jrosdahl jrosdahl added this to the 3.2.7 milestone Jul 19, 2016
@jrosdahl jrosdahl added the bug Does not work as intended/documented label Jul 19, 2016
@jrosdahl
Copy link
Member

Applied. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Does not work as intended/documented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants