Skip to content

Use defined(...) when testing for defined-ness of macros #2399

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

Merged
merged 1 commit into from
Jun 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/util/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,33 +1217,33 @@ irep_idt configt::this_architecture()

#ifdef __alpha__
this_arch="alpha";
#elif __armel__
#elif defined(__armel__)
this_arch="armel";
#elif __aarch64__
#elif defined(__aarch64__)
this_arch="arm64";
#elif __arm__
#elif defined(__arm__)
#ifdef __ARM_PCS_VFP
this_arch="armhf"; // variant of arm with hard float
#else
this_arch="arm";
#endif
#elif __mipsel__
#elif defined(__mipsel__)
#if _MIPS_SIM==_ABIO32
this_arch="mipsel";
#elif _MIPS_SIM==_ABIN32
this_arch="mipsn32el";
#else
this_arch="mips64el";
#endif
#elif __mips__
#elif defined(__mips__)
#if _MIPS_SIM==_ABIO32
this_arch="mips";
#elif _MIPS_SIM==_ABIN32
this_arch="mipsn32";
#else
this_arch="mips64";
#endif
#elif __powerpc__
#elif defined(__powerpc__)
#if defined(__ppc64__) || defined(__PPC64__) || \
defined(__powerpc64__) || defined(__POWERPC64__)
#ifdef __LITTLE_ENDIAN__
Expand All @@ -1254,33 +1254,33 @@ irep_idt configt::this_architecture()
#else
this_arch="powerpc";
#endif
#elif __sparc__
#elif defined(__sparc__)
#ifdef __arch64__
this_arch="sparc64";
#else
this_arch="sparc";
#endif
#elif __ia64__
#elif defined(__ia64__)
this_arch="ia64";
#elif __s390x__
#elif defined(__s390x__)
this_arch="s390x";
#elif __s390__
#elif defined(__s390__)
this_arch="s390";
#elif __x86_64__
#elif defined(__x86_64__)
#ifdef __ILP32__
this_arch="x32"; // variant of x86_64 with 32-bit pointers
#else
this_arch="x86_64";
#endif
#elif __i386__
#elif defined(__i386__)
this_arch="i386";
#elif _WIN64
#elif defined(_WIN64)
this_arch="x86_64";
#elif _WIN32
#elif defined(_WIN32)
this_arch="i386";
#elif __hppa__
#elif defined(__hppa__)
this_arch="hppa";
#elif __sh__
#elif defined(__sh__)
this_arch="sh4";
#else
// something new and unknown!
Expand Down