danmar / simplecpp

C++ preprocessor
BSD Zero Clause License
209 stars 83 forks source link

End of double #define not recognized #321

Closed chrchr-github closed 1 year ago

chrchr-github commented 1 year ago
#define MIN_LON  -180.
#define MAX_LON   180.

extern void g();

void f(double *lon) {
    if ((*lon < MIN_LON) || (*lon > MAX_LON)) {}
}

Output:

void g ( ) ;

void f ( double * lon ) {
if ( ( * lon <  -  180. ) || ( * lon >  180.extern ) ) { }
}