Skip to content
This repository was archived by the owner on May 21, 2019. 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 preprocessor-firefighting branch from a18521d to c23f749 Compare November 20, 2016 09:41
@alexcrichton alexcrichton merged commit a8fc4c1 into rust-lang:rust-llvm-2016-07-18 Nov 20, 2016
TimNN pushed 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
Development

Successfully merging this pull request may close these issues.

2 participants