Skip to content

Preprocessor #if code incorrect #678

@WilliamKF

Description

@WilliamKF

The C preprocessor is not correctly processing complex rules. The following example is processed incorrectly:

#define SDS_ARCH_darwin_15_i86

#ifdef SDS_ARCH_freebsd_61_i86
#include <sys/endian.h>
#elif defined(SDS_ARCH_darwin_15_i86)
#include <libkern/OSByteOrder.h> // Incorrectly not taken.
#elif defined(SDS_ARCH_winxp) || defined(SDS_ARCH_Interix)
#else
#include <byteswap.h>  // Incorrectly taken
#endif

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions