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

Fix preprocessor directive for non-targeted platforms #28

Merged
merged 1 commit into from Nov 20, 2016

Conversation

Projects
None yet
2 participants
@xen0n
Copy link

xen0n commented Nov 20, 2016

The C preprocessor treats undefined identifiers in #if expressions
as 0 except for true and false, so the additional expression for
Linux-style MIPS ABIs actually turned to 0 == 0 for all other platforms
where _MIPS_SIM is not defined. Fix that by explicitly checking for
_MIPS_SIM's presence.

Fix preprocessor directive for non-targeted platforms
The C preprocessor treats undefined identifiers in `#if` expressions
as `0` except for `true` and `false`, so the additional expression for
Linux-style MIPS ABIs actually turned to `0 == 0` for all other platforms
where `_MIPS_SIM` is not defined. Fix that by explicitly checking for
`_MIPS_SIM`'s presence.

@xen0n xen0n force-pushed the xen0n:preprocessor-firefighting branch from a18521d to c23f749 Nov 20, 2016

@alexcrichton alexcrichton merged commit a8fc4c1 into rust-lang:rust-llvm-2016-07-18 Nov 20, 2016

@alexcrichton alexcrichton referenced this pull request Apr 18, 2017

Merged

LLVM 4.0 Upgrade #40123

5 of 5 tasks complete

TimNN added a commit that referenced this pull request Apr 23, 2017

Merge pull request #28 from xen0n/preprocessor-firefighting
Fix preprocessor directive for non-targeted platforms

TimNN added a commit that referenced this pull request Jul 20, 2017

Merge pull request #28 from xen0n/preprocessor-firefighting
Fix preprocessor directive for non-targeted platforms

@glaubitz glaubitz referenced this pull request Jan 30, 2018

Merged

Workaround LLVM bug 11663 #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment