Pedantic gcc warning: type qualifiers on function return type

It doesn’t violate the standard. That’s why they’re warnings and not errors.

And indeed you’re right — the leading const is superfluous. The compiler warns you because you’ve added code that in other circumstances might mean something, but in this circumstance means nothing, and it wants to make sure you won’t be disappointed later when your return values turn out to be modifiable after all.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)