public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/111654] New: Introduce clang's invalid-noreturn warning
@ 2023-10-01 13:09 tanksherman27 at gmail dot com
2023-10-02 9:41 ` [Bug c/111654] " manu at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: tanksherman27 at gmail dot com @ 2023-10-01 13:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111654
Bug ID: 111654
Summary: Introduce clang's invalid-noreturn warning
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: tanksherman27 at gmail dot com
Target Milestone: ---
Created attachment 56022
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56022&action=edit
Patch to add invalid-noreturn to gcc
clang has a toggleable warning flag named invalid-noreturn for noreturn
functions that return either implicitly or explicitly, while gcc has different
warnings for both explicit and implicit cases. We should add this warning (with
an extra level of tuneability since unlike clang gcc has different warnings for
each) for compatibility with clang, and for utility purposes since code may
desire to mark functions as noreturn even though it may (in the compiler's
point of view) return
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/111654] Introduce clang's invalid-noreturn warning
2023-10-01 13:09 [Bug driver/111654] New: Introduce clang's invalid-noreturn warning tanksherman27 at gmail dot com
@ 2023-10-02 9:41 ` manu at gcc dot gnu.org
2023-10-02 10:17 ` tanksherman27 at gmail dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu.org @ 2023-10-02 9:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111654
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Julian Waters from comment #0)
> Created attachment 56022 [details]
> Patch to add invalid-noreturn to gcc
Patches should be submitted to gcc-patches@gcc.gnu.org
For more details, please read:
https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps
Except for clang compatibility, I believe the consensus is that numerical
levels are not user-friendly. I think it would be better to have:
-Wnoreturn-implicit-return
-Wnoreturn-explicit-return
-Winvalid-noreturn enables / disables both.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/111654] Introduce clang's invalid-noreturn warning
2023-10-01 13:09 [Bug driver/111654] New: Introduce clang's invalid-noreturn warning tanksherman27 at gmail dot com
2023-10-02 9:41 ` [Bug c/111654] " manu at gcc dot gnu.org
@ 2023-10-02 10:17 ` tanksherman27 at gmail dot com
2023-10-02 10:22 ` sjames at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tanksherman27 at gmail dot com @ 2023-10-02 10:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111654
--- Comment #2 from Julian Waters <tanksherman27 at gmail dot com> ---
(In reply to Manuel López-Ibáñez from comment #1)
> (In reply to Julian Waters from comment #0)
> > Created attachment 56022 [details]
> > Patch to add invalid-noreturn to gcc
>
> Patches should be submitted to gcc-patches@gcc.gnu.org
>
> For more details, please read:
> https://gcc.gnu.org/wiki/GettingStarted#Basics:
> _Contributing_to_GCC_in_10_easy_steps
>
> Except for clang compatibility, I believe the consensus is that numerical
> levels are not user-friendly. I think it would be better to have:
>
> -Wnoreturn-implicit-return
> -Wnoreturn-explicit-return
>
> -Winvalid-noreturn enables / disables both.
Yeah, I did try submitting it to gcc-patches, but it simply went ignored for
forever, so I decided to submit the patch through the bug system instead, like
others have done. I implemented it as numeric values to avoid inventing new
names for -Woption and because it was easier to implement for a gcc beginner
like myself, so worded warnings are likely to take me longer to implement
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/111654] Introduce clang's invalid-noreturn warning
2023-10-01 13:09 [Bug driver/111654] New: Introduce clang's invalid-noreturn warning tanksherman27 at gmail dot com
2023-10-02 9:41 ` [Bug c/111654] " manu at gcc dot gnu.org
2023-10-02 10:17 ` tanksherman27 at gmail dot com
@ 2023-10-02 10:22 ` sjames at gcc dot gnu.org
2023-10-02 12:46 ` manu at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-10-02 10:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111654
--- Comment #3 from Sam James <sjames at gcc dot gnu.org> ---
It would be worth mentioning that then.
Anyway:
*
https://inbox.sourceware.org/gcc-patches/CAP2b4GMQ7BTqTeqUUuOk7oJt8p3kDBdvPuDrmo_nT95WUmW6kg@mail.gmail.com/
*
https://inbox.sourceware.org/gcc-patches/CAP2b4GMfj0gX_AAHmu4xcNq2L6dOOHR8pFtZpYQ4MCcdzH-JEg@mail.gmail.com/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/111654] Introduce clang's invalid-noreturn warning
2023-10-01 13:09 [Bug driver/111654] New: Introduce clang's invalid-noreturn warning tanksherman27 at gmail dot com
` (2 preceding siblings ...)
2023-10-02 10:22 ` sjames at gcc dot gnu.org
@ 2023-10-02 12:46 ` manu at gcc dot gnu.org
2023-10-02 23:21 ` egallager at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu.org @ 2023-10-02 12:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111654
--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Julian Waters from comment #2)
> (In reply to Manuel López-Ibáñez from comment #1)
> Yeah, I did try submitting it to gcc-patches, but it simply went ignored for
> forever, so I decided to submit the patch through the bug system instead,
> like others have done. I implemented it as numeric values to avoid inventing
> new names for -Woption and because it was easier to implement for a gcc
> beginner like myself, so worded warnings are likely to take me longer to
> implement
Apologies, I was not aware of that.
I think it is a good idea to add the link to the mailing list here in bugzilla
so it is not lost in the mailing list archive.
Unfortunately, gcc does not have any patch tracking system so it is up to
submitters to ping patches (the submitter is the one interested in seeing the
patch committed). See for example:
https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627958.html
It may take 4 to 10 pings to get the patch reviewed. It helps sometimes to
describe the area the patch touches in the subject. In your case, I would write
"[C family]".
It helps reviewers if you mention how the patch was tested and also if the
patch is attached as plain-text (not as application/*):
https://gcc.gnu.org/contribute.html#patches
See other suggestions on how to interact with the GCC community here:
https://gcc.gnu.org/wiki/Community
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/111654] Introduce clang's invalid-noreturn warning
2023-10-01 13:09 [Bug driver/111654] New: Introduce clang's invalid-noreturn warning tanksherman27 at gmail dot com
` (3 preceding siblings ...)
2023-10-02 12:46 ` manu at gcc dot gnu.org
@ 2023-10-02 23:21 ` egallager at gcc dot gnu.org
2023-10-18 8:12 ` tanksherman27 at gmail dot com
2024-05-26 12:18 ` tanksherman27 at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: egallager at gcc dot gnu.org @ 2023-10-02 23:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111654
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egallager at gcc dot gnu.org
--- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #4)
> Unfortunately, gcc does not have any patch tracking system
I thought someone was getting a patchwork installation set up?
...ok yeah, here it is; it's being hosted on sourceware currently:
https://patchwork.sourceware.org/project/gcc/list/
(could be made a little more discoverable from gcc.gnu.org IMO)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/111654] Introduce clang's invalid-noreturn warning
2023-10-01 13:09 [Bug driver/111654] New: Introduce clang's invalid-noreturn warning tanksherman27 at gmail dot com
` (4 preceding siblings ...)
2023-10-02 23:21 ` egallager at gcc dot gnu.org
@ 2023-10-18 8:12 ` tanksherman27 at gmail dot com
2024-05-26 12:18 ` tanksherman27 at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: tanksherman27 at gmail dot com @ 2023-10-18 8:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111654
--- Comment #6 from Julian Waters <tanksherman27 at gmail dot com> ---
Sorry for the late reply, I was busy with certain things
Are we going with numeric invalid-noreturn or explicit-noreturn +
implicit-noreturn? I'm not to sure how to implement the latter, if we're going
with that
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/111654] Introduce clang's invalid-noreturn warning
2023-10-01 13:09 [Bug driver/111654] New: Introduce clang's invalid-noreturn warning tanksherman27 at gmail dot com
` (5 preceding siblings ...)
2023-10-18 8:12 ` tanksherman27 at gmail dot com
@ 2024-05-26 12:18 ` tanksherman27 at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: tanksherman27 at gmail dot com @ 2024-05-26 12:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111654
--- Comment #7 from Julian Waters <tanksherman27 at gmail dot com> ---
I recently stumbled upon -Wno-attributes, which can apparently take a parameter
like -Wno-attributes=vendor:: and I think that's appropriate for this
particular situation. How does -Wno-invalid-noreturn,
-Wno-invalid-noreturn=explicit and -Wno-invalid-noreturn=implicit sound? But I
have no idea how to implement this type of option within gcc, any advice?
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-05-26 12:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-01 13:09 [Bug driver/111654] New: Introduce clang's invalid-noreturn warning tanksherman27 at gmail dot com
2023-10-02 9:41 ` [Bug c/111654] " manu at gcc dot gnu.org
2023-10-02 10:17 ` tanksherman27 at gmail dot com
2023-10-02 10:22 ` sjames at gcc dot gnu.org
2023-10-02 12:46 ` manu at gcc dot gnu.org
2023-10-02 23:21 ` egallager at gcc dot gnu.org
2023-10-18 8:12 ` tanksherman27 at gmail dot com
2024-05-26 12:18 ` tanksherman27 at gmail dot com
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).