Re:New C features in GCC 13
by peterfirefly on Thursday May 04, 2023 @12:48PM
(#35818401)
#define DEF (ABC+(GHI<<JKL_SHIFT))Please make a point.
Re:New C features in GCC 13
by peterfirefly on Thursday May 04, 2023 @05:42PM
(#35822493)
I did. This is exactly what we need for constexpr for.
Nothing you've demonstrated requires the use of constexpr. A const is perfectly suited for that.
Re:New C features in GCC 13
by peterfirefly on Friday May 05, 2023 @02:29AM
(#35825863)
One of us doesn't know C.
https://godbolt.org/z/de1YGG5r1
I hope for your sake that you don't speak this way other than anonymously on the Internet; it reflects very poorly of you.
const is sufficient to eliminate the use of macro-constants with the exception of the use of such constants by the preprocessor itself (in which case constexpr is also inapplicable).