Re: [Development] On the use of the inline keyword

2023-09-11 Thread Marc Mutz via Development
On 26.08.23 10:51, Volker Hilsheimer via Development wrote: > It seems to be a rare issue, triggered by specific circumstances. With the > knowledge that we have now, we can fix issues when they arise, and don’t have > to change all the problematic use right now. Yes, this email was to ensure

Re: [Development] On the use of the inline keyword

2023-08-28 Thread Ahmad Samir
On 26/8/23 11:51, Volker Hilsheimer wrote: On 25 Aug 2023, at 14:20, Ahmad Samir wrote: On 25/8/23 14:11, Cristian Adam via Development wrote: The other way of fixing this is by using ... macros. The article at c++ - Importing inline functions in MinGW - Stack

Re: [Development] On the use of the inline keyword

2023-08-26 Thread Volker Hilsheimer via Development
> On 25 Aug 2023, at 14:20, Ahmad Samir wrote: > > On 25/8/23 14:11, Cristian Adam via Development wrote: >> The other way of fixing this is by using ... macros. The article at c++ - >> Importing inline functions in MinGW - Stack >>

Re: [Development] On the use of the inline keyword

2023-08-25 Thread Thiago Macieira
On Friday, 25 August 2023 01:34:17 PDT Hasselmann Mathias via Development wrote: > Am 24.08.2023 um 21:42 schrieb Thiago Macieira: > > That warning looks like a bug in the compiler instead. So if there's no > > ill- effect, I'd just disable and ignore it. > > Seems like an easy fix, but breaks

Re: [Development] On the use of the inline keyword

2023-08-25 Thread Ahmad Samir
On 25/8/23 14:11, Cristian Adam via Development wrote: The other way of fixing this is by using ... macros. The article at c++ - Importing inline functions in MinGW - Stack Overflow mentions using inline in the

Re: [Development] On the use of the inline keyword

2023-08-25 Thread Cristian Adam via Development
The other way of fixing this is by using ... macros. The article at c++ - Importing inline functions in MinGW - Stack Overflow mentions using inline in the class declaration. Their example works fine with both

Re: [Development] On the use of the inline keyword

2023-08-25 Thread Kai Köhne via Development
Not an GCC expert, but this is the code that emits the warning in GCC: https://github.com/gcc-mirror/gcc/blob/66be6ed81f369573824f1a8f5a3538a63472292f/gcc/attribs.cc#L1818 First argument for warning() is 0 ... which explains why it cannot be easily disabled with say -Wno-ignored-attributes. I

Re: [Development] On the use of the inline keyword

2023-08-25 Thread Hasselmann Mathias via Development
Am 24.08.2023 um 21:42 schrieb Thiago Macieira: That warning looks like a bug in the compiler instead. So if there's no ill- effect, I'd just disable and ignore it. Seems like an easy fix, but breaks user code that explicitly enables this warning. Guess ignoring is not a good option, if one

Re: [Development] On the use of the inline keyword

2023-08-24 Thread Thiago Macieira
On Thursday, 24 August 2023 05:37:28 PDT Volker Hilsheimer via Development wrote: > Before we now go on a campaign to clean all this up (as is already being > reviewed for qstring.h), I’d rather evaluate other options for the existing > code base. > > Can we disable this warning some in some

Re: [Development] On the use of the inline keyword

2023-08-24 Thread Volker Hilsheimer via Development
Thanks for the background info, Cristian! It’s fine to agree that, for new code, the inline goes only on the declaration, and must not be on the definition. For existing code: throwing the somewhat but not totally (I think) naive regexp

Re: [Development] On the use of the inline keyword

2023-08-23 Thread Cristian Adam via Development
Hi, The issue here is that MinGW GCC is issuing a warning and that we compile with -Werror to treat warnings as errors. c++ - Importing inline functions in MinGW - Stack Overflow has a similar case. LLVM-MinGW

[Development] On the use of the inline keyword

2023-08-23 Thread Marc Mutz via Development
Hi, Every now and then we get a sporadic MinGW error because someone writes the moral equivalent of the following: class Q_FOO_EXPORT QMeep { QBar bar() const; }; inline QBar QMeep::bar() const; Resulting in something like this: qmeep.h: