AmbiqSuiteSDK icon indicating copy to clipboard operation
AmbiqSuiteSDK copied to clipboard

apollo3.h conflict with #define OVERFLOW

Open oclyke opened this issue 5 years ago • 1 comments
trafficstars

Some type definitions in apollo3.h use the identifier OVERFLOW however when it has already been defined as a numeric constant (for example by math library headers) this error arises:

error: expected unqualified-id before numeric constant

One potential solution is to undefine OVERFLOW if it is defined when apollo3.h is included. This solution may have been instituted in the past: e346c6f

However that solution left OVERFLOW undefined. The new solution in 2.4.2-patch-fullduplex-spi stores the previous value of OVERFLOW and restores it at the end of the file

oclyke avatar Jun 30 '20 06:06 oclyke

This issue persists in AmbiqSuite SDK 2.5.1 and has a corresponding patch branch

oclyke avatar Oct 05 '20 16:10 oclyke