Re: [LAD] G++ trouble

From: Fons Adriaensen <fons@email-addr-hidden>
Date: Mon Nov 16 2020 - 14:02:03 EET

On Mon, Nov 16, 2020 at 12:24:10PM +0100, Kjetil Matheussen wrote:

> A common mistake in C is omitting extern when declaring a global
> variable in a header file. If the header is included by several files
> it results in multiple definitions of the same variable.

But

* I _do_ have 'extern' in the header file, and
* the header file is included in only one .cc file.

Alexandre:

Using 'extern' in a _definition_ seems like a contradiction to me...
So for now I assume it's a G++ bug.

Thanks to both of you,

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

This archive was generated by hypermail 2.1.8 : Tue Nov 17 2020 - 04:15:02 EET