public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* g++ command line checking
@ 2020-07-09 22:51 Jonny Grant
  2020-07-09 23:58 ` Jonathan Wakely
  0 siblings, 1 reply; 20+ messages in thread
From: Jonny Grant @ 2020-07-09 22:51 UTC (permalink / raw)
  To: gcc-help

Hello

I noticed g++ ignores -W as I understand it that alone doesn't turn anything on?
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

Also may I ask if specifying both -pedantic -Wpedantic be an error? They are the same as I understand. g++ doesn't reject them both being specified.

Another example is -O1 -O0 -O3, the later -03 seems to be used. Maybe nice to say too many optimization options specified?

Cheers, Jonny

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-09 22:51 g++ command line checking Jonny Grant
@ 2020-07-09 23:58 ` Jonathan Wakely
  2020-07-09 23:59   ` Jonathan Wakely
  2020-07-10  7:37   ` Jonny Grant
  0 siblings, 2 replies; 20+ messages in thread
From: Jonathan Wakely @ 2020-07-09 23:58 UTC (permalink / raw)
  To: Jonny Grant; +Cc: gcc-help

On Thu, 9 Jul 2020 at 23:54, Jonny Grant <jg@jguk.org> wrote:
>
> Hello
>
> I noticed g++ ignores -W as I understand it that alone doesn't turn anything on?

No, -W is identical to -Wextra.

> https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
>
> Also may I ask if specifying both -pedantic -Wpedantic be an error? They are the same as I understand. g++ doesn't reject them both being specified.

They mean the same thing. It's not an error to repeat options.

> Another example is -O1 -O0 -O3, the later -03 seems to be used. Maybe nice to say too many optimization options specified?

No, it's common (and very useful) to append an option to the end of a
command and have it override earlier options.

This behaviour is documented, and relied on by many people.



>
> Cheers, Jonny

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-09 23:58 ` Jonathan Wakely
@ 2020-07-09 23:59   ` Jonathan Wakely
  2020-07-10  7:37   ` Jonny Grant
  1 sibling, 0 replies; 20+ messages in thread
From: Jonathan Wakely @ 2020-07-09 23:59 UTC (permalink / raw)
  To: Jonny Grant; +Cc: gcc-help

On Fri, 10 Jul 2020 at 00:58, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
> On Thu, 9 Jul 2020 at 23:54, Jonny Grant <jg@jguk.org> wrote:
> >
> > Hello
> >
> > I noticed g++ ignores -W as I understand it that alone doesn't turn anything on?
>
> No, -W is identical to -Wextra.
>
> > https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> >
> > Also may I ask if specifying both -pedantic -Wpedantic be an error? They are the same as I understand. g++ doesn't reject them both being specified.
>
> They mean the same thing. It's not an error to repeat options.
>
> > Another example is -O1 -O0 -O3, the later -03 seems to be used. Maybe nice to say too many optimization options specified?
>
> No, it's common (and very useful) to append an option to the end of a
> command and have it override earlier options.
>
> This behaviour is documented, and relied on by many people.

The manual says "If you use multiple -O options, with or without level
numbers, the last such option is the one that is effective."

Similar wording exists for -g options.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-09 23:58 ` Jonathan Wakely
  2020-07-09 23:59   ` Jonathan Wakely
@ 2020-07-10  7:37   ` Jonny Grant
  2020-07-10  8:17     ` Xi Ruoyao
                       ` (2 more replies)
  1 sibling, 3 replies; 20+ messages in thread
From: Jonny Grant @ 2020-07-10  7:37 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

Thank you for you reply.

On 10/07/2020 00:58, Jonathan Wakely wrote:
> On Thu, 9 Jul 2020 at 23:54, Jonny Grant <jg@jguk.org> wrote:
>>
>> Hello
>>
>> I noticed g++ ignores -W as I understand it that alone doesn't turn anything on?
> 
> No, -W is identical to -Wextra.

I looked but couldn't find any mention of it.

Is it worth documenting this on the page?
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

 
>> https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
>>
>> Also may I ask if specifying both -pedantic -Wpedantic be an error? They are the same as I understand. g++ doesn't reject them both being specified.
> 
> They mean the same thing. It's not an error to repeat options.

Fair enough, it doesn't help anyone remove duplicates from their warning list in makefile etc though.

>> Another example is -O1 -O0 -O3, the later -03 seems to be used. Maybe nice to say too many optimization options specified?
> 
> No, it's common (and very useful) to append an option to the end of a
> command and have it override earlier options.
> 
> This behaviour is documented, and relied on by many people.

clang gives a nice helpful warning I recall.

I usually just amend the optimisation earlier in the command line myself.


This isn't directly related, but the main page doesn't show what version of GCC it refers to
https://gcc.gnu.org/onlinedocs/gcc/

Could the page show what version it is on that page?

Took me a while to realise that this page was only introduced with GCC 10 from what I can see
https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html

Cheers, Jonny


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-10  7:37   ` Jonny Grant
@ 2020-07-10  8:17     ` Xi Ruoyao
  2020-07-10  8:47     ` Jonathan Wakely
  2020-07-10 11:46     ` Matthias Pfaller
  2 siblings, 0 replies; 20+ messages in thread
From: Xi Ruoyao @ 2020-07-10  8:17 UTC (permalink / raw)
  To: Jonny Grant; +Cc: gcc-help

On 2020-07-10 08:37 +0100, Jonny Grant wrote:
> Thank you for you reply.
> 
> On 10/07/2020 00:58, Jonathan Wakely wrote:
> > On Thu, 9 Jul 2020 at 23:54, Jonny Grant <jg@jguk.org> wrote:
> > > Hello
> > > 
> > > I noticed g++ ignores -W as I understand it that alone doesn't turn
> > > anything on?
> > 
> > No, -W is identical to -Wextra.
> 
> I looked but couldn't find any mention of it.
> 
> Is it worth documenting this on the page?
> https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

It's already there:

> -Wextra
> This enables some extra warning flags that are not enabled by -Wall. (This
> option used to be called -W. The older name is still supported, but the newer
> name is more descriptive.)
 
> > > https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> > > 
> > > Also may I ask if specifying both -pedantic -Wpedantic be an error? They
> > > are the same as I understand. g++ doesn't reject them both being
> > > specified.
> > 
> > They mean the same thing. It's not an error to repeat options.
> 
> Fair enough, it doesn't help anyone remove duplicates from their warning list
> in makefile etc though.

In many real packages the building system just works fine with a lot of
duplicates.  Even the building system of GCC itself compiles many files with
duplicated options.  If you really hate duplicates it's simple to find them:

echo $CFLAGS | sed 's@ @\n@g' | grep -v "^$" | uniq -d

> > > Another example is -O1 -O0 -O3, the later -03 seems to be used. Maybe nice
> > > to say too many optimization options specified?
> > 
> > No, it's common (and very useful) to append an option to the end of a
> > command and have it override earlier options.
> > 
> > This behaviour is documented, and relied on by many people.
> 
> clang gives a nice helpful warning I recall.

No.  You can try:

$ clang -O1 -O0 -O3 test.c
(no diagnostics)

> I usually just amend the optimisation earlier in the command line myself.
> 
> 
> This isn't directly related, but the main page doesn't show what version of
> GCC it refers to
> https://gcc.gnu.org/onlinedocs/gcc/
> 
> Could the page show what version it is on that page?

git master.
-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-10  7:37   ` Jonny Grant
  2020-07-10  8:17     ` Xi Ruoyao
@ 2020-07-10  8:47     ` Jonathan Wakely
  2020-07-10 21:47       ` Jonny Grant
  2020-07-10 11:46     ` Matthias Pfaller
  2 siblings, 1 reply; 20+ messages in thread
From: Jonathan Wakely @ 2020-07-10  8:47 UTC (permalink / raw)
  To: Jonny Grant; +Cc: gcc-help

On Fri, 10 Jul 2020 at 08:37, Jonny Grant <jg@jguk.org> wrote:
>
> Thank you for you reply.
>
> On 10/07/2020 00:58, Jonathan Wakely wrote:
> > On Thu, 9 Jul 2020 at 23:54, Jonny Grant <jg@jguk.org> wrote:
> >>
> >> Hello
> >>
> >> I noticed g++ ignores -W as I understand it that alone doesn't turn anything on?
> >
> > No, -W is identical to -Wextra.
>
> I looked but couldn't find any mention of it.
>
> Is it worth documenting this on the page?
> https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

As mentioned, it's there. Search for -Wextra to find it. Searching for
"-W " with a space doesn't find it because it's followed by a full
stop. Searching for -W\> works though if you're reading the man page
in a pager that supports regex searches.

> >> https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> >>
> >> Also may I ask if specifying both -pedantic -Wpedantic be an error? They are the same as I understand. g++ doesn't reject them both being specified.
> >
> > They mean the same thing. It's not an error to repeat options.
>
> Fair enough, it doesn't help anyone remove duplicates from their warning list in makefile etc though.

So what? Why would you need to do that?

> >> Another example is -O1 -O0 -O3, the later -03 seems to be used. Maybe nice to say too many optimization options specified?
> >
> > No, it's common (and very useful) to append an option to the end of a
> > command and have it override earlier options.
> >
> > This behaviour is documented, and relied on by many people.
>
> clang gives a nice helpful warning I recall.

I don't think it does.

> I usually just amend the optimisation earlier in the command line myself.

I don't. Lots of other people don't.

> This isn't directly related, but the main page doesn't show what version of GCC it refers to
> https://gcc.gnu.org/onlinedocs/gcc/
>
> Could the page show what version it is on that page?

No version, it's the unreleased development sources.

> Took me a while to realise that this page was only introduced with GCC 10 from what I can see
> https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html

Then you should probably be looking at the docs for your GCC version
instead of the unreleased development sources. The docs for each
version are available at https://gcc.gnu.org/onlinedocs/

Right at the bottom of the page is the link to the doc you've been
using, which says "Please note that the following documentation refers
to current development. Some information may not be applicable to any
existing release."

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-10  7:37   ` Jonny Grant
  2020-07-10  8:17     ` Xi Ruoyao
  2020-07-10  8:47     ` Jonathan Wakely
@ 2020-07-10 11:46     ` Matthias Pfaller
  2 siblings, 0 replies; 20+ messages in thread
From: Matthias Pfaller @ 2020-07-10 11:46 UTC (permalink / raw)
  To: gcc-help

[-- Attachment #1: Type: text/plain, Size: 2060 bytes --]

On 7/10/20 9:37 AM, Jonny Grant wrote:
> Thank you for you reply.
> 
> On 10/07/2020 00:58, Jonathan Wakely wrote:
>> On Thu, 9 Jul 2020 at 23:54, Jonny Grant <jg@jguk.org> wrote:
>>>
>>> Hello
>>>
>>> I noticed g++ ignores -W as I understand it that alone doesn't turn anything on?
>>
>> No, -W is identical to -Wextra.
> 
> I looked but couldn't find any mention of it.
> 
> Is it worth documenting this on the page?
> https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> 
>  
>>> https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
>>>
>>> Also may I ask if specifying both -pedantic -Wpedantic be an error? They are the same as I understand. g++ doesn't reject them both being specified.
>>
>> They mean the same thing. It's not an error to repeat options.
> 
> Fair enough, it doesn't help anyone remove duplicates from their warning list in makefile etc though.
> 
>>> Another example is -O1 -O0 -O3, the later -03 seems to be used. Maybe nice to say too many optimization options specified?
>>
>> No, it's common (and very useful) to append an option to the end of a
>> command and have it override earlier options.
>>
>> This behaviour is documented, and relied on by many people.

And just in case you don't get why this is usefull, consider the
following CFLAGS settings we are using for our embedded targets:

# per target cflags
CFLAGS  +=$(CFLAGS_$(@:.o=))

That way I can e.g. set generic warning and optimization levels in
CFLAGS. If I need to override something for specific targets I just write:

# disable -Wcast-qual where necessary
CFLAGS_dprintf  =-Wno-cast-qual
# Optimize for space and not for speed
CFLAGS_inner	=-Os

Regards, Matthias
-- 
Matthias Pfaller                          Software Entwicklung
marco Systemanalyse und Entwicklung GmbH  Tel   +49 8131 5161 41
Hans-Böckler-Str. 2, D 85221 Dachau       Fax   +49 8131 5161 66
http://www.marco.de/                      Email leo@marco.de
Geschäftsführer Martin Reuter             HRB 171775 Amtsgericht München


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4034 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-10  8:47     ` Jonathan Wakely
@ 2020-07-10 21:47       ` Jonny Grant
  2020-07-10 22:57         ` Jonathan Wakely
  0 siblings, 1 reply; 20+ messages in thread
From: Jonny Grant @ 2020-07-10 21:47 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help



On 10/07/2020 09:47, Jonathan Wakely wrote:
> On Fri, 10 Jul 2020 at 08:37, Jonny Grant <jg@jguk.org> wrote:
>>
>> Thank you for you reply.
>>
>> On 10/07/2020 00:58, Jonathan Wakely wrote:
>>> On Thu, 9 Jul 2020 at 23:54, Jonny Grant <jg@jguk.org> wrote:
>>>>
>>>> Hello
>>>>
>>>> I noticed g++ ignores -W as I understand it that alone doesn't turn anything on?
>>>
>>> No, -W is identical to -Wextra.
>>
>> I looked but couldn't find any mention of it.
>>
>> Is it worth documenting this on the page?
>> https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> 
> As mentioned, it's there. Search for -Wextra to find it. Searching for
> "-W " with a space doesn't find it because it's followed by a full
> stop. Searching for -W\> works though if you're reading the man page
> in a pager that supports regex searches.

Ah yes, there is is. Personally I'd be tempted to just reformat the sentence so it had a space after, to make it simpler for users to find.

("This option used to be called -W . The older name is still supported, but the newer name is more descriptive.)"


>>>> https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
>>>>
>>>> Also may I ask if specifying both -pedantic -Wpedantic be an error? They are the same as I understand. g++ doesn't reject them both being specified.
>>>
>>> They mean the same thing. It's not an error to repeat options.
>>
>> Fair enough, it doesn't help anyone remove duplicates from their warning list in makefile etc though.
> 
> So what? Why would you need to do that?
> 
>>>> Another example is -O1 -O0 -O3, the later -03 seems to be used. Maybe nice to say too many optimization options specified?
>>>
>>> No, it's common (and very useful) to append an option to the end of a
>>> command and have it override earlier options.
>>>
>>> This behaviour is documented, and relied on by many people.
>>
>> clang gives a nice helpful warning I recall.
> 
> I don't think it does.

Just checked, you're right, it doesn't, my mistake.

>> I usually just amend the optimisation earlier in the command line myself.
> 
> I don't. Lots of other people don't.
> 
>> This isn't directly related, but the main page doesn't show what version of GCC it refers to
>> https://gcc.gnu.org/onlinedocs/gcc/
>>
>> Could the page show what version it is on that page?
> 
> No version, it's the unreleased development sources.

Ah, so maybe it could say trunk or development version? Although it looks like it's the official version to me, it doesn't say "beta" or anything in the URL or at the top of the page. I had expected it to just be the latest release.

>> Took me a while to realise that this page was only introduced with GCC 10 from what I can see
>> https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html
> 
> Then you should probably be looking at the docs for your GCC version
> instead of the unreleased development sources. The docs for each
> version are available at https://gcc.gnu.org/onlinedocs/
> 
> Right at the bottom of the page is the link to the doc you've been
> using, which says "Please note that the following documentation refers
> to current development. Some information may not be applicable to any
> existing release."

The reality is, on big pages, people don't often get to the bottom of the page below 2.95.2. You're right, I missed that note down there.

Cheers, Jonny

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-10 21:47       ` Jonny Grant
@ 2020-07-10 22:57         ` Jonathan Wakely
  2020-07-10 23:05           ` Jonny Grant
  0 siblings, 1 reply; 20+ messages in thread
From: Jonathan Wakely @ 2020-07-10 22:57 UTC (permalink / raw)
  To: Jonny Grant; +Cc: gcc-help

On Fri, 10 Jul 2020 at 22:47, Jonny Grant wrote:
>
>
>
> On 10/07/2020 09:47, Jonathan Wakely wrote:
> > Right at the bottom of the page is the link to the doc you've been
> > using, which says "Please note that the following documentation refers
> > to current development. Some information may not be applicable to any
> > existing release."
>
> The reality is, on big pages, people don't often get to the bottom of the page below 2.95.2. You're right, I missed that note down there.

Which is why the docs for the unreleased development sources are
tucked away right at the end.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-10 22:57         ` Jonathan Wakely
@ 2020-07-10 23:05           ` Jonny Grant
  2020-07-13 20:55             ` Martin Sebor
  0 siblings, 1 reply; 20+ messages in thread
From: Jonny Grant @ 2020-07-10 23:05 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help



On 10/07/2020 23:57, Jonathan Wakely wrote:
> On Fri, 10 Jul 2020 at 22:47, Jonny Grant wrote:
>>
>>
>>
>> On 10/07/2020 09:47, Jonathan Wakely wrote:
>>> Right at the bottom of the page is the link to the doc you've been
>>> using, which says "Please note that the following documentation refers
>>> to current development. Some information may not be applicable to any
>>> existing release."
>>
>> The reality is, on big pages, people don't often get to the bottom of the page below 2.95.2. You're right, I missed that note down there.
> 
> Which is why the docs for the unreleased development sources are
> tucked away right at the end.

Fair enough.

I recall it came up via a google search for one of the options. If it had "dev" or "beta" in the URL it would be clearer.
Jonny

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-10 23:05           ` Jonny Grant
@ 2020-07-13 20:55             ` Martin Sebor
  2020-07-15  9:23               ` Jonny Grant
  0 siblings, 1 reply; 20+ messages in thread
From: Martin Sebor @ 2020-07-13 20:55 UTC (permalink / raw)
  To: Jonny Grant, Jonathan Wakely; +Cc: gcc-help

On 7/10/20 5:05 PM, Jonny Grant wrote:
> 
> 
> On 10/07/2020 23:57, Jonathan Wakely wrote:
>> On Fri, 10 Jul 2020 at 22:47, Jonny Grant wrote:
>>>
>>>
>>>
>>> On 10/07/2020 09:47, Jonathan Wakely wrote:
>>>> Right at the bottom of the page is the link to the doc you've been
>>>> using, which says "Please note that the following documentation refers
>>>> to current development. Some information may not be applicable to any
>>>> existing release."
>>>
>>> The reality is, on big pages, people don't often get to the bottom of the page below 2.95.2. You're right, I missed that note down there.
>>
>> Which is why the docs for the unreleased development sources are
>> tucked away right at the end.
> 
> Fair enough.
> 
> I recall it came up via a google search for one of the options. If it had "dev" or "beta" in the URL it would be clearer.

It's a common mistake.  I agree that more prominently mentioning
the version would help.  Including it in the file name seems like
a simple enough change.

The manual does mention the GCC version (the cover page of the PDF
copy of the manual says "For GCC version 11.0.0 (pre-release), and
the Introduction section of the HTML version says "corresponds to
the compilers (GCC) version 11.0.0."  That's helpful but not as
much as if every page mentioned it at the top (for the HTML, it
would have to be in the browser title bar), and if the URL of
development version also included it.

Martin

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-13 20:55             ` Martin Sebor
@ 2020-07-15  9:23               ` Jonny Grant
  2020-07-15  9:50                 ` Jonathan Wakely
  2020-07-15 14:57                 ` Segher Boessenkool
  0 siblings, 2 replies; 20+ messages in thread
From: Jonny Grant @ 2020-07-15  9:23 UTC (permalink / raw)
  To: Martin Sebor, Jonathan Wakely; +Cc: gcc-help



On 13/07/2020 21:55, Martin Sebor wrote:
> On 7/10/20 5:05 PM, Jonny Grant wrote:
>>
>>
>> On 10/07/2020 23:57, Jonathan Wakely wrote:
>>> On Fri, 10 Jul 2020 at 22:47, Jonny Grant wrote:
>>>>
>>>>
>>>>
>>>> On 10/07/2020 09:47, Jonathan Wakely wrote:
>>>>> Right at the bottom of the page is the link to the doc you've been
>>>>> using, which says "Please note that the following documentation refers
>>>>> to current development. Some information may not be applicable to any
>>>>> existing release."
>>>>
>>>> The reality is, on big pages, people don't often get to the bottom of the page below 2.95.2. You're right, I missed that note down there.
>>>
>>> Which is why the docs for the unreleased development sources are
>>> tucked away right at the end.
>>
>> Fair enough.
>>
>> I recall it came up via a google search for one of the options. If it had "dev" or "beta" in the URL it would be clearer.
> 
> It's a common mistake.  I agree that more prominently mentioning
> the version would help.  Including it in the file name seems like
> a simple enough change.
> 
> The manual does mention the GCC version (the cover page of the PDF
> copy of the manual says "For GCC version 11.0.0 (pre-release), and
> the Introduction section of the HTML version says "corresponds to
> the compilers (GCC) version 11.0.0."  That's helpful but not as
> much as if every page mentioned it at the top (for the HTML, it
> would have to be in the browser title bar), and if the URL of
> development version also included it.

Good morning Martin,

Thank you for your reply.
Would be good if the version be added to the pager and even the URL as "beta".


GDB has a similar page
https://sourceware.org/gdb/current/onlinedocs/gdb/

It has the version number on the 2nd line after the title:

This is the Tenth Edition, of Debugging with GDB: the GNU Source-Level Debugger for GDB (GDB) Version 10.0.50.20200715-git.

This is the equivalent GCC page without the version:
https://gcc.gnu.org/onlinedocs/gcc/

Cheers

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-15  9:23               ` Jonny Grant
@ 2020-07-15  9:50                 ` Jonathan Wakely
  2020-07-15 11:03                   ` Jonny Grant
  2020-07-15 14:57                 ` Segher Boessenkool
  1 sibling, 1 reply; 20+ messages in thread
From: Jonathan Wakely @ 2020-07-15  9:50 UTC (permalink / raw)
  To: Jonny Grant; +Cc: Martin Sebor, gcc-help

On Wed, 15 Jul 2020 at 10:23, Jonny Grant <jg@jguk.org> wrote:
> Would be good if the version be added to the pager and even the URL as "beta".

Absolutely not "beta" because there are no "beta" versions of GCC, so
that would be worse than it is now.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-15  9:50                 ` Jonathan Wakely
@ 2020-07-15 11:03                   ` Jonny Grant
  2020-07-15 13:14                     ` Jonathan Wakely
  0 siblings, 1 reply; 20+ messages in thread
From: Jonny Grant @ 2020-07-15 11:03 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Martin Sebor, gcc-help



On 15/07/2020 10:50, Jonathan Wakely wrote:
> On Wed, 15 Jul 2020 at 10:23, Jonny Grant <jg@jguk.org> wrote:
>> Would be good if the version be added to the pager and even the URL as "beta".
> 
> Absolutely not "beta" because there are no "beta" versions of GCC, so
> that would be worse than it is now.

May I ask what you would suggest as an update to the URL.
Jonny

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-15 11:03                   ` Jonny Grant
@ 2020-07-15 13:14                     ` Jonathan Wakely
  2020-07-15 13:41                       ` Jonny Grant
  0 siblings, 1 reply; 20+ messages in thread
From: Jonathan Wakely @ 2020-07-15 13:14 UTC (permalink / raw)
  To: Jonny Grant; +Cc: Martin Sebor, gcc-help

On Wed, 15 Jul 2020 at 12:03, Jonny Grant <jg@jguk.org> wrote:
>
>
>
> On 15/07/2020 10:50, Jonathan Wakely wrote:
> > On Wed, 15 Jul 2020 at 10:23, Jonny Grant <jg@jguk.org> wrote:
> >> Would be good if the version be added to the pager and even the URL as "beta".
> >
> > Absolutely not "beta" because there are no "beta" versions of GCC, so
> > that would be worse than it is now.
>
> May I ask what you would suggest as an update to the URL.

I wouldn't change the URL at all. A page header or footer with
relevant version info (possibly automatically inserted by the
webserver) would be much better. Some browsers are moving away from
displaying URLs, and some users don't read them, so if you consider
the information important, hiding it in the URL is a bad idea.

But if changing the URL was necessary, I'd choose something that isn't
a lie. The development trunk is not a "beta" release or "beta"
quality, so it makes no sense to put "beta" there.

From https://en.wikipedia.org/wiki/Software_release_life_cycle#Beta
"A Beta phase generally begins when the software is feature complete
but likely to contain a number of known or unknown bugs."
Nope, that's not the case for the dev trunk.
"The process of delivering a beta version to the users is called beta
release and this is typically the first time that the software is
available outside of the organization that developed it."
Neither is that.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-15 13:14                     ` Jonathan Wakely
@ 2020-07-15 13:41                       ` Jonny Grant
  2020-07-15 14:03                         ` Jonathan Wakely
  0 siblings, 1 reply; 20+ messages in thread
From: Jonny Grant @ 2020-07-15 13:41 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Martin Sebor, gcc-help



On 15/07/2020 14:14, Jonathan Wakely wrote:
> On Wed, 15 Jul 2020 at 12:03, Jonny Grant <jg@jguk.org> wrote:
>>
>>
>>
>> On 15/07/2020 10:50, Jonathan Wakely wrote:
>>> On Wed, 15 Jul 2020 at 10:23, Jonny Grant <jg@jguk.org> wrote:
>>>> Would be good if the version be added to the pager and even the URL as "beta".
>>>
>>> Absolutely not "beta" because there are no "beta" versions of GCC, so
>>> that would be worse than it is now.
>>
>> May I ask what you would suggest as an update to the URL.
> 
> I wouldn't change the URL at all. A page header or footer with
> relevant version info (possibly automatically inserted by the
> webserver) would be much better. Some browsers are moving away from
> displaying URLs, and some users don't read them, so if you consider
> the information important, hiding it in the URL is a bad idea.
> 
> But if changing the URL was necessary, I'd choose something that isn't
> a lie. The development trunk is not a "beta" release or "beta"
> quality, so it makes no sense to put "beta" there.
> 
>From https://en.wikipedia.org/wiki/Software_release_life_cycle#Beta
> "A Beta phase generally begins when the software is feature complete
> but likely to contain a number of known or unknown bugs."
> Nope, that's not the case for the dev trunk.
> "The process of delivering a beta version to the users is called beta
> release and this is typically the first time that the software is
> available outside of the organization that developed it."
> Neither is that.
> 

"dev" or "git" may be enough in the URL.
URLs aren't disappearing just yet.

Maybe someone can add the version to the page like GDB has? Footer is a bit hidden away when it's meant to be clear it's not the stable release documentation.

I'd be tempted to suggest adding the URL folder to robots.txt to prevent the development documentation coming up first on google.

Jonny


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-15 13:41                       ` Jonny Grant
@ 2020-07-15 14:03                         ` Jonathan Wakely
  0 siblings, 0 replies; 20+ messages in thread
From: Jonathan Wakely @ 2020-07-15 14:03 UTC (permalink / raw)
  To: Jonny Grant; +Cc: Martin Sebor, gcc-help

On Wed, 15 Jul 2020 at 14:41, Jonny Grant wrote:
> I'd be tempted to suggest adding the URL folder to robots.txt to prevent the development documentation coming up first on google.

From some quick tests, that might mean no gcc.gnu.org result is on the
first page. That would be bad.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-15  9:23               ` Jonny Grant
  2020-07-15  9:50                 ` Jonathan Wakely
@ 2020-07-15 14:57                 ` Segher Boessenkool
  2020-07-15 19:19                   ` Jonathan Wakely
  2020-07-16  0:15                   ` Jonny Grant
  1 sibling, 2 replies; 20+ messages in thread
From: Segher Boessenkool @ 2020-07-15 14:57 UTC (permalink / raw)
  To: Jonny Grant; +Cc: Martin Sebor, Jonathan Wakely, gcc-help

On Wed, Jul 15, 2020 at 10:23:30AM +0100, Jonny Grant wrote:
> > It's a common mistake.  I agree that more prominently mentioning
> > the version would help.  Including it in the file name seems like
> > a simple enough change.
> > 
> > The manual does mention the GCC version (the cover page of the PDF
> > copy of the manual says "For GCC version 11.0.0 (pre-release), and
> > the Introduction section of the HTML version says "corresponds to
> > the compilers (GCC) version 11.0.0."  That's helpful but not as
> > much as if every page mentioned it at the top (for the HTML, it
> > would have to be in the browser title bar), and if the URL of
> > development version also included it.
> 
> Good morning Martin,
> 
> Thank you for your reply.
> Would be good if the version be added to the pager and even the URL as "beta".

A much bigger problem is that google likes to have just some (old!)
versions at the top of the search results.  It could help if all those
pages had a nice header letting you navigate to other versions?  (It
already *is* in the URL, but that is only useful for people who know
that already, completely not the goal!)

(Hey I can dream, can't I :-) )


Segher

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-15 14:57                 ` Segher Boessenkool
@ 2020-07-15 19:19                   ` Jonathan Wakely
  2020-07-16  0:15                   ` Jonny Grant
  1 sibling, 0 replies; 20+ messages in thread
From: Jonathan Wakely @ 2020-07-15 19:19 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Jonny Grant, Martin Sebor, gcc-help

On Wed, 15 Jul 2020 at 15:57, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> A much bigger problem is that google likes to have just some (old!)
> versions at the top of the search results.  It could help if all those
> pages had a nice header letting you navigate to other versions?  (It
> already *is* in the URL, but that is only useful for people who know
> that already, completely not the goal!)
>
> (Hey I can dream, can't I :-) )

The docs for old versions of Boost have a notice saying "This is the
documentation for an old version of Boost. Click here to view this
page for the latest version."

e.g. https://www.boost.org/doc/libs/1_61_0/libs/smart_ptr/shared_ptr.htm

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: g++ command line checking
  2020-07-15 14:57                 ` Segher Boessenkool
  2020-07-15 19:19                   ` Jonathan Wakely
@ 2020-07-16  0:15                   ` Jonny Grant
  1 sibling, 0 replies; 20+ messages in thread
From: Jonny Grant @ 2020-07-16  0:15 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Martin Sebor, Jonathan Wakely, gcc-help



On 15/07/2020 15:57, Segher Boessenkool wrote:
> On Wed, Jul 15, 2020 at 10:23:30AM +0100, Jonny Grant wrote:
>>> It's a common mistake.  I agree that more prominently mentioning
>>> the version would help.  Including it in the file name seems like
>>> a simple enough change.
>>>
>>> The manual does mention the GCC version (the cover page of the PDF
>>> copy of the manual says "For GCC version 11.0.0 (pre-release), and
>>> the Introduction section of the HTML version says "corresponds to
>>> the compilers (GCC) version 11.0.0."  That's helpful but not as
>>> much as if every page mentioned it at the top (for the HTML, it
>>> would have to be in the browser title bar), and if the URL of
>>> development version also included it.
>>
>> Good morning Martin,
>>
>> Thank you for your reply.
>> Would be good if the version be added to the pager and even the URL as "beta".
> 
> A much bigger problem is that google likes to have just some (old!)
> versions at the top of the search results.  It could help if all those
> pages had a nice header letting you navigate to other versions?  (It
> already *is* in the URL, but that is only useful for people who know
> that already, completely not the goal!)
> 
> (Hey I can dream, can't I :-) )
> 
> 
> Segher
> 

It might be worth adding 2.95 to the robots.txt, and any others that are more than 3 years old?
https://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc.html

Let's help search engines not bring older releases to the top of search results

Cheers, Jonny

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2020-07-16  0:15 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 22:51 g++ command line checking Jonny Grant
2020-07-09 23:58 ` Jonathan Wakely
2020-07-09 23:59   ` Jonathan Wakely
2020-07-10  7:37   ` Jonny Grant
2020-07-10  8:17     ` Xi Ruoyao
2020-07-10  8:47     ` Jonathan Wakely
2020-07-10 21:47       ` Jonny Grant
2020-07-10 22:57         ` Jonathan Wakely
2020-07-10 23:05           ` Jonny Grant
2020-07-13 20:55             ` Martin Sebor
2020-07-15  9:23               ` Jonny Grant
2020-07-15  9:50                 ` Jonathan Wakely
2020-07-15 11:03                   ` Jonny Grant
2020-07-15 13:14                     ` Jonathan Wakely
2020-07-15 13:41                       ` Jonny Grant
2020-07-15 14:03                         ` Jonathan Wakely
2020-07-15 14:57                 ` Segher Boessenkool
2020-07-15 19:19                   ` Jonathan Wakely
2020-07-16  0:15                   ` Jonny Grant
2020-07-10 11:46     ` Matthias Pfaller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).