Re: [LAD] G++ trouble

From: Fons Adriaensen <fons@email-addr-hidden>
Date: Tue Nov 17 2020 - 11:59:07 EET

On Mon, Nov 16, 2020 at 11:24:35PM +0100, Uwe Koloska wrote:

> It's standard behavior, but have only found it on
> https://en.cppreference.com/w/cpp/language/cv#Notes
>
> The const qualifier used on a declaration of a non-local non-volatile
> non-template (since C++14) non-inline (since C++17) variable that is not
> declared extern gives it internal linkage. This is different from C
> where const file scope variables have external linkage.

Interesting, thanks.

But it doesn't make sense to me. I've always understood 'extern' has
'defined somewhere but not here'. In other words 'extern' must be
part of a declaration, and not of a definition as that would be
a contradiction in terms.

Ciao,

-- 
FA
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Nov 18 04:15:02 2020

This archive was generated by hypermail 2.1.8 : Wed Nov 18 2020 - 04:15:02 EET