Duplicate const qualifier allowed in C but not in C++?

C99 §6.7.3/4:

If the same qualifier appears more than once in the same specifier-qualifier-list, either directly or via one or more typedef s, the behavior is the same as if it appeared only once.

Yes, that is valid C99, and your discovery is correct.

Leave a Comment