public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/107942] New: [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone
@ 2022-11-30 23:49 pinskia at gcc dot gnu.org
2022-11-30 23:51 ` [Bug c/107942] " pinskia at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-30 23:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107942
Bug ID: 107942
Summary: [10/11/12/13 Regression] Documentation of the volatile
style for noreturn is gone
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: documentation
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
r5-7698-g8648c55f3b703a removed the documentation of the volatile style of
noreturn even though it is still implemented as of today.
Take:
```
typedef void voidfn ();
volatile voidfn fatal;
void fatal() {}
```
This still warns today with the C front-end:
<source>: In function 'fatal':
<source>:8:1: warning: 'noreturn' function does return
8 | }
| ^
The reasoning why the documentation was removed was it references an (real) old
version of GCC.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/107942] [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone
2022-11-30 23:49 [Bug c/107942] New: [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone pinskia at gcc dot gnu.org
@ 2022-11-30 23:51 ` pinskia at gcc dot gnu.org
2022-11-30 23:58 ` [Bug c/107942] [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone and const style for const attribute " pinskia at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-30 23:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107942
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.8.5
Known to fail| |5.1.0
Target Milestone|--- |10.5
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Function-Attributes.html#index-g_t_0040code_007bnoreturn_007d-function-attribute-2696
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/107942] [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone and const style for const attribute is gone
2022-11-30 23:49 [Bug c/107942] New: [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone pinskia at gcc dot gnu.org
2022-11-30 23:51 ` [Bug c/107942] " pinskia at gcc dot gnu.org
@ 2022-11-30 23:58 ` pinskia at gcc dot gnu.org
2022-12-01 0:07 ` pinskia at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-30 23:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107942
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11/12/13 Regression] |[10/11/12/13 Regression]
|Documentation of the |Documentation of the
|volatile style for noreturn |volatile style for noreturn
|is gone |is gone and const style for
| |const attribute is gone
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Const is gone the same way with the same patch.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/107942] [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone and const style for const attribute is gone
2022-11-30 23:49 [Bug c/107942] New: [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone pinskia at gcc dot gnu.org
2022-11-30 23:51 ` [Bug c/107942] " pinskia at gcc dot gnu.org
2022-11-30 23:58 ` [Bug c/107942] [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone and const style for const attribute " pinskia at gcc dot gnu.org
@ 2022-12-01 0:07 ` pinskia at gcc dot gnu.org
2022-12-01 0:09 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-01 0:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107942
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is the sample program to prove that const is still handled like const
attribute:
```
typedef int voidfn (void);
const voidfn constt;
[[gnu::noipa]]
int constt(void) {return 1;}
int f(void)
{
return constt()+constt();
}
```
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/107942] [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone and const style for const attribute is gone
2022-11-30 23:49 [Bug c/107942] New: [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone pinskia at gcc dot gnu.org
` (2 preceding siblings ...)
2022-12-01 0:07 ` pinskia at gcc dot gnu.org
@ 2022-12-01 0:09 ` pinskia at gcc dot gnu.org
2022-12-01 0:13 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-01 0:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107942
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reference to the patch that was sent:
https://gcc.gnu.org/pipermail/gcc-patches/2015-March/414153.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/107942] [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone and const style for const attribute is gone
2022-11-30 23:49 [Bug c/107942] New: [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone pinskia at gcc dot gnu.org
` (3 preceding siblings ...)
2022-12-01 0:09 ` pinskia at gcc dot gnu.org
@ 2022-12-01 0:13 ` pinskia at gcc dot gnu.org
2022-12-01 0:14 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-01 0:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107942
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh it is still part of the keyword index too:
https://gcc.gnu.org/onlinedocs/gcc/Keyword-Index.html#Keyword-Index
Which links to:
https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-volatile-applied-to-function
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/107942] [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone and const style for const attribute is gone
2022-11-30 23:49 [Bug c/107942] New: [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone pinskia at gcc dot gnu.org
` (4 preceding siblings ...)
2022-12-01 0:13 ` pinskia at gcc dot gnu.org
@ 2022-12-01 0:14 ` pinskia at gcc dot gnu.org
2022-12-21 13:33 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-01 0:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107942
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> Oh it is still part of the keyword index too:
> https://gcc.gnu.org/onlinedocs/gcc/Keyword-Index.html#Keyword-Index
>
> Which links to:
> https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-volatile-
> applied-to-function
Likewise for const:
https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-const-applied-to-function
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/107942] [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone and const style for const attribute is gone
2022-11-30 23:49 [Bug c/107942] New: [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone pinskia at gcc dot gnu.org
` (5 preceding siblings ...)
2022-12-01 0:14 ` pinskia at gcc dot gnu.org
@ 2022-12-21 13:33 ` rguenth at gcc dot gnu.org
2023-07-07 10:44 ` [Bug c/107942] [11/12/13/14 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-12-21 13:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107942
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jsm28 at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-12-21
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
I wonder if we should remove this handling? (I think it's good the manual no
longer suggests it)
I suppose the standard doesn't give const or volatile qualification any
semantics (or requires a diagnostic)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/107942] [11/12/13/14 Regression] Documentation of the volatile style for noreturn is gone and const style for const attribute is gone
2022-11-30 23:49 [Bug c/107942] New: [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone pinskia at gcc dot gnu.org
` (6 preceding siblings ...)
2022-12-21 13:33 ` rguenth at gcc dot gnu.org
@ 2023-07-07 10:44 ` rguenth at gcc dot gnu.org
2024-01-18 18:41 ` cvs-commit at gcc dot gnu.org
2024-01-18 18:43 ` sandra at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107942
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/107942] [11/12/13/14 Regression] Documentation of the volatile style for noreturn is gone and const style for const attribute is gone
2022-11-30 23:49 [Bug c/107942] New: [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone pinskia at gcc dot gnu.org
` (7 preceding siblings ...)
2023-07-07 10:44 ` [Bug c/107942] [11/12/13/14 " rguenth at gcc dot gnu.org
@ 2024-01-18 18:41 ` cvs-commit at gcc dot gnu.org
2024-01-18 18:43 ` sandra at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-18 18:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107942
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sandra Loosemore <sandra@gcc.gnu.org>:
https://gcc.gnu.org/g:dbda6cd58308bf13bf9b367604cb459b1c627344
commit r14-8258-gdbda6cd58308bf13bf9b367604cb459b1c627344
Author: Sandra Loosemore <sandra@codesourcery.com>
Date: Thu Jan 18 18:28:22 2024 +0000
Restore documentation for const/volatile functions [PR107942]
In r5-7698-g8648c55f3b703a I accidentally removed the documentation of
GCC's special interpretation of const/volatile qualifiers on functions
from the function attributes section, thinking this was just a
bit-rotten leftover from old versions of GCC. PR107942 points out
that this functionality is still present even though the docs are now gone.
I decided this material didn't really belong in the function
attributes discussion, but a new subsection in the general list of GCC
extensions to the C language. And I agree with the comment in the
issue that we shouldn't really recommend this usage any more.
gcc/ChangeLog
PR c/107942
* doc/extend.texi (C Extensions): Add new section to menu.
(Function Attributes): Move dangling index entries to....
(Const and Volatile Functions): New section.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/107942] [11/12/13/14 Regression] Documentation of the volatile style for noreturn is gone and const style for const attribute is gone
2022-11-30 23:49 [Bug c/107942] New: [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone pinskia at gcc dot gnu.org
` (8 preceding siblings ...)
2024-01-18 18:41 ` cvs-commit at gcc dot gnu.org
@ 2024-01-18 18:43 ` sandra at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: sandra at gcc dot gnu.org @ 2024-01-18 18:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107942
sandra at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from sandra at gcc dot gnu.org ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-01-18 18:43 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30 23:49 [Bug c/107942] New: [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone pinskia at gcc dot gnu.org
2022-11-30 23:51 ` [Bug c/107942] " pinskia at gcc dot gnu.org
2022-11-30 23:58 ` [Bug c/107942] [10/11/12/13 Regression] Documentation of the volatile style for noreturn is gone and const style for const attribute " pinskia at gcc dot gnu.org
2022-12-01 0:07 ` pinskia at gcc dot gnu.org
2022-12-01 0:09 ` pinskia at gcc dot gnu.org
2022-12-01 0:13 ` pinskia at gcc dot gnu.org
2022-12-01 0:14 ` pinskia at gcc dot gnu.org
2022-12-21 13:33 ` rguenth at gcc dot gnu.org
2023-07-07 10:44 ` [Bug c/107942] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-01-18 18:41 ` cvs-commit at gcc dot gnu.org
2024-01-18 18:43 ` sandra at gcc dot gnu.org
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).