Skip to content
This repository has been archived by the owner. It is now read-only.

Fix preprocessor directive for non-targeted platforms #28

Merged

Conversation

@xen0n
Copy link

@xen0n 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.

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 mentioned this pull request Apr 18, 2017
5 of 5 tasks complete
TimNN added a commit that referenced this pull request Apr 23, 2017
Fix preprocessor directive for non-targeted platforms
TimNN added a commit that referenced this pull request Jul 20, 2017
Fix preprocessor directive for non-targeted platforms
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants