Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: LLONG_MAX not available from c++



On Fri, Mar 31, 2023 at 15:25:02 +0000, RVP wrote:

> You have to create an empty file for `-E -dM' to work correctly:

Not necessary, -x c++ is enough, but that's a very common pitfall
indeed.

# c, despite being called as c++
$ g++ -dM -E - < /dev/null | egrep -i 'stdc|plus'
#define __STDC_HOSTED__ 1
#define __STDC_UTF_16__ 1
#define __STDC_VERSION__ 201112L
#define __GNUC_STDC_INLINE__ 1
#define __STDC_UTF_32__ 1
#define __STDC__ 1

# needs explicit language selection with -x or an an input file suffix
$ gcc -x c++ -dM -E - < /dev/null | egrep -i 'stdc|plus'
#define __STDC_HOSTED__ 1
#define __cplusplus 199711L
#define __STDC__ 1


-uwe


Home | Main Index | Thread Index | Old Index