Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 23 |
Nodes: | 6 (0 / 6) |
Uptime: | 44:44:54 |
Calls: | 583 |
Calls today: | 1 |
Files: | 1,138 |
Messages: | 110,829 |
OK, there are 3 members of non-POD type, any maybe inlining is not
adequate. But shouldn't the compiler just take the best implementation?
Or are default generated functions necessarily forced to be inline?
On Sat, 23 Aug 2025 16:15:03 +0200
David Brown <david.brown@hesbynett.no> gabbled:
meant "all warnings" when it was first introduced, but these days
there are hundreds of warning flags in gcc, and /nobody/ wants them
all enabled.
Presumably "nobody" is defined in a similar way as "all". It almost no one but some people will. I'm one of them.
suitable for a wide range of programs".-a Warnings that are triggered
by common code constructs - whether the code is right or wrong - are
rarely added to the set of "-Wall" warnings because they could mess up
build scripts for existing code (especially if the build has "-Werror"
to turn warnings into errors).
And why is that a bad idea? Perhaps some hidden bugs have been found. If
you don't want that behaviour then don't upgrade the compiler.
and other options come and go (I know I have).-a gcc has more warnings
than most compilers, but clang has even more.-a It also has a compiler
option "-Weverything" that really does enable all warnings.-a It is only
Didn't know about Weverything, just tried it and its actually found a
minor bug
in a program I'm working on atm.
On 23/08/2025 16:26, boltar@caprica.universe wrote:[...]
On Sat, 23 Aug 2025 16:15:03 +0200
David Brown <david.brown@hesbynett.no> gabbled:
meant "all warnings" when it was first introduced, but these days
there are hundreds of warning flags in gcc, and /nobody/ wants them
all enabled.
Presumably "nobody" is defined in a similar way as "all". It almost no
one
but some people will. I'm one of them.
I very much doubt that you are.
Do you want a warning when you write "float x, y; x = y + 2.5;" ?-a Do
On 8/24/2025 5:45 AM, David Brown wrote:
On 23/08/2025 16:26, boltar@caprica.universe wrote:[...]
On Sat, 23 Aug 2025 16:15:03 +0200
David Brown <david.brown@hesbynett.no> gabbled:
meant "all warnings" when it was first introduced, but these days
there are hundreds of warning flags in gcc, and /nobody/ wants them
all enabled.
Presumably "nobody" is defined in a similar way as "all". It almost
no one
but some people will. I'm one of them.
I very much doubt that you are.
Do you want a warning when you write "float x, y; x = y + 2.5;" ?-a Do
x = y + 2.5
Actually, sometimes I want a warning wrt 2.5 vs 2.5f...
On 23/08/2025 16:26, boltar@caprica.universe wrote:
On Sat, 23 Aug 2025 16:15:03 +0200
David Brown <david.brown@hesbynett.no> gabbled:
meant "all warnings" when it was first introduced, but these days
there are hundreds of warning flags in gcc, and /nobody/ wants them
all enabled.
Presumably "nobody" is defined in a similar way as "all". It almost no one >> but some people will. I'm one of them.
I very much doubt that you are.
Do you want a warning when you write "float x, y; x = y + 2.5;" ? Do
you want a warning when you write "char x; x = x + 1;" ? Do you want a
warning for "printf(s);" instead of "printf("%s", s);" ? Do you want a
warning for all "switch" statements which don't have a "default" case?
Do you want a warning on "int * p = 0;" ? Do you want to warn about >constructs that are not present in C or C++ standards other than the one
you have chosen?
Of course you are free to enable as many warnings as you like when you
use gcc. But before the gcc developers would bother implementing a >"-Wabsolutely-everything" flag, they'd have to be persuaded that it
would actually be useful to developers, worth the effort of implementing
it, and worth the cost of the consequences of it (such a flag would
limit the possibilities for flags that are not simply on/off). I have
seen discussions on the gcc mailing lists about a clang-style
"-Weverything" flag for gcc, and read about why it is considered
something of a joke flag in clang and only really of use when testing
the compiler.
handled in some way, and not just ignored. A "give me everything" flag
that floods the output with false positives is only marginally better
than no warnings at all.
Didn't know about Weverything, just tried it and its actually found a
minor bug
in a program I'm working on atm.
Then you might want to look at the available warning options in whatever >compiler(s) you use, and start enabling them in your build system.
On 8/24/2025 5:45 AM, David Brown wrote:
On 23/08/2025 16:26, boltar@caprica.universe wrote:[...]
On Sat, 23 Aug 2025 16:15:03 +0200
David Brown <david.brown@hesbynett.no> gabbled:
meant "all warnings" when it was first introduced, but these days
there are hundreds of warning flags in gcc, and /nobody/ wants them
all enabled.
Presumably "nobody" is defined in a similar way as "all". It almost
no one
but some people will. I'm one of them.
I very much doubt that you are.
Do you want a warning when you write "float x, y; x = y + 2.5;" ?-a Do
x = y + 2.5
Actually, sometimes I want a warning wrt 2.5 vs 2.5f...
On Sun, 24 Aug 2025 14:45:12 +0200
David Brown <david.brown@hesbynett.no> gabbled:
warning for "printf(s);" instead of "printf("%s", s);" ? Do you want a
Why would that produce a warning?
On Sun, 24 Aug 2025 14:45:12 +0200
warning for "printf(s);" instead of "printf("%s", s);" ? Do you want a
Why would that produce a warning?
On Sun, 24 Aug 2025 14:45:12 +0200
David Brown <david.brown@hesbynett.no> gabbled:
On 23/08/2025 16:26, boltar@caprica.universe wrote:
On Sat, 23 Aug 2025 16:15:03 +0200
David Brown <david.brown@hesbynett.no> gabbled:
meant "all warnings" when it was first introduced, but these days
there are hundreds of warning flags in gcc, and /nobody/ wants them
all enabled.
Presumably "nobody" is defined in a similar way as "all". It almost
no one
but some people will. I'm one of them.
I very much doubt that you are.
Do you want a warning when you write "float x, y; x = y + 2.5;" ?-a Do
you want a warning when you write "char x; x = x + 1;" ?-a Do you want a
Do I want a warning about using uninitialised variables? Umm, let me think...
.. yes please!
warning for "printf(s);" instead of "printf("%s", s);" ?-a Do you want a
Why would that produce a warning?
warning for all "switch" statements which don't have a "default" case?
Happens already.
Do you want a warning on "int * p = 0;" ?-a Do you want to warn about
constructs that are not present in C or C++ standards other than the
one you have chosen?
Yes, otherwise I wouldn't have specified a particular version.
Of course you are free to enable as many warnings as you like when you
use gcc.-a But before the gcc developers would bother implementing a
"-Wabsolutely-everything" flag, they'd have to be persuaded that it
would actually be useful to developers, worth the effort of
implementing it, and worth the cost of the consequences of it (such a
flag would limit the possibilities for flags that are not simply
on/off).-a I have seen discussions on the gcc mailing lists about a
clang-style "-Weverything" flag for gcc, and read about why it is
considered something of a joke flag in clang and only really of use
when testing the compiler.
"all" should mean all, not almost all, or the ones considered useful.
There was nothing stopping them using a different flag, eg -Wstandard
or something like that for the kind of warnings considered useful.
handled in some way, and not just ignored.-a A "give me everything"
flag that floods the output with false positives is only marginally
better than no warnings at all.
Gcc standard warnings have nothing on the gibberish the C++ compiler
spits out
when there's a template error. Why the compiler writers think 3 pages of unintelligable crap is a useful tool in order to find what usually turns
out
to be a simple typo i have no idea. Clang is far better , though still far from perfect.
Didn't know about Weverything, just tried it and its actually found a
minor bug
in a program I'm working on atm.
Then you might want to look at the available warning options in
whatever compiler(s) you use, and start enabling them in your build
system.
Life is too short to google all possible warning flags and figure out which ones I need.
On 24/08/2025 22:42, boltar@caprica.universe wrote:
"all" should mean all, not almost all, or the ones considered useful.
There was nothing stopping them using a different flag, eg -Wstandard
or something like that for the kind of warnings considered useful.
Then "-Wall" would be useless.
And yes, there /are/ things stopping gcc developers from changing flag
names without very good reason - it is effort on their part that could
be better spent on useful things, and it is effort on the part of all
their users that would then have to change their build scripts and flags
to match the pointless changes.
Gcc standard warnings have nothing on the gibberish the C++ compiler
spits out
when there's a template error. Why the compiler writers think 3 pages of
unintelligable crap is a useful tool in order to find what usually turns
out
to be a simple typo i have no idea. Clang is far better , though still far >> from perfect.
That is a red herring, completely irrelevant to the argument you have
been trying to make.
But it is also an issue that every C++ compiler has had trouble with
since the dawn of C++ templates.
Life is too short to google all possible warning flags and figure out which >> ones I need.
But it is long enough to rant about how the warning flags don't suit
your needs? Okay...
On Mon, 25 Aug 2025 16:36:01 +0200
David Brown <david.brown@hesbynett.no> wrote:
On 24/08/2025 22:42, boltar@caprica.universe wrote:
"all" should mean all, not almost all, or the ones considered useful.
There was nothing stopping them using a different flag, eg -Wstandard
or something like that for the kind of warnings considered useful.
Then "-Wall" would be useless.
And yes, there /are/ things stopping gcc developers from changing flag
names without very good reason - it is effort on their part that could
be better spent on useful things, and it is effort on the part of all
their users that would then have to change their build scripts and
flags to match the pointless changes.
-Wall should have continued to mean all as compiler versions progressed. Other warning options could have been introduced to keep the output similar to earlier compiler versions or alternatively a flag to compile as an older version.
Gcc standard warnings have nothing on the gibberish the C++ compiler
spits out
when there's a template error. Why the compiler writers think 3 pages
of unintelligable crap is a useful tool in order to find what usually
turns out
to be a simple typo i have no idea. Clang is far better , though
still far
from perfect.
That is a red herring, completely irrelevant to the argument you have
been trying to make.
No, you're making a Big Deal out of lots of warnings when a standard
error dump from gcc can be pages long and utterly useless.
But it is also an issue that every C++ compiler has had trouble with
since the dawn of C++ templates.
A syntax error is a syntax error. Templates should make no difference.
Life is too short to google all possible warning flags and figure out
which
ones I need.
But it is long enough to rant about how the warning flags don't suit
your needs?-a Okay...
Using that logic I shouldn't post on this group at all until i've read
the latest C++ specification from start to finish.
On 25/08/2025 22:01, boltar@battlestar-galactica.com wrote:
-Wall should have continued to mean all as compiler versions progressed.
Other warning options could have been introduced to keep the output similar >> to earlier compiler versions or alternatively a flag to compile as an older >> version.
Certainly the gcc developers could have taken other paths here. They
could have said "You know that old "-Wall" flag you all find useful?
Well, now we are going to make it useless, and you'll have to start
using other flags instead if you want a practical selection of
warnings." That would have kept the name "all" meaning "all". I'm
No, you're making a Big Deal out of lots of warnings when a standard
error dump from gcc can be pages long and utterly useless.
/I/ am not the one making a big deal out of anything. /You/ are getting >your knickers in a twist because "-Wall" doesn't mean enable absolutely
On Tue, 26 Aug 2025 09:06:23 +0200
David Brown <david.brown@hesbynett.no> wrote:
On 25/08/2025 22:01, boltar@battlestar-galactica.com wrote:
-Wall should have continued to mean all as compiler versions progressed. >>> Other warning options could have been introduced to keep the output
similar
to earlier compiler versions or alternatively a flag to compile as an
older
version.
Certainly the gcc developers could have taken other paths here.-a They
could have said "You know that old "-Wall" flag you all find useful?
Well, now we are going to make it useless, and you'll have to start
using other flags instead if you want a practical selection of
warnings."-a That would have kept the name "all" meaning "all".-a I'm
"You know that old -Wall flag that used to show all the warnings? Well
now its not going to any more, good eh? You won't know which ones we've
left out and they might change with each release, but here's a new bunch
of -W flags which will also change meaning in the future. Have fun with
your build!"
No, you're making a Big Deal out of lots of warnings when a standard
error dump from gcc can be pages long and utterly useless.
/I/ am not the one making a big deal out of anything.-a /You/ are
getting your knickers in a twist because "-Wall" doesn't mean enable
absolutely
I originally posted a single short paragraph on the subject. You're the
one responding with pages defending gcc. Are you on the dev team or something?
Or you can read the relevant page in the gcc manual - it is not
difficult to understand.
Or you can remain stubbornly and wilfully ignorant and make a fool of >yourself crying about something that is only a problem in your own mind.
I originally posted a single short paragraph on the subject. You're the
one responding with pages defending gcc. Are you on the dev team or
something?
My apologies for being helpful and informative. I'll try not to let it >happen again.
On 24/08/2025 21:56, Chris M. Thomasson wrote:
On 8/24/2025 5:45 AM, David Brown wrote:
On 23/08/2025 16:26, boltar@caprica.universe wrote:[...]
On Sat, 23 Aug 2025 16:15:03 +0200
David Brown <david.brown@hesbynett.no> gabbled:
meant "all warnings" when it was first introduced, but these days
there are hundreds of warning flags in gcc, and /nobody/ wants them >>>>> all enabled.
Presumably "nobody" is defined in a similar way as "all". It almost
no one
but some people will. I'm one of them.
I very much doubt that you are.
Do you want a warning when you write "float x, y; x = y + 2.5;" ?-a Do
x = y + 2.5
Actually, sometimes I want a warning wrt 2.5 vs 2.5f...
Exactly - /sometimes/ people want that kind of warning, which is why gcc
has it.-a It is typically useful for targets where there is hardware
support for single-precision floating point, but not for double-
precision floating point.-a It can also be helpful where there might be significant differences in performance, perhaps due to vectorisation.
But most people are not at all interested in such a warning, and prefer
not to clutter their code with "f" suffixes.
All these unusual warnings are useful to /some/ people - but it is very unlikely that any one person will want /all/ of these warnings enabled
at the same time, for the same code.