public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107791] New: Spurious -Wunused warning for artificial variable introduced for post contract
@ 2022-11-21 11:37 redi at gcc dot gnu.org
2022-11-21 17:30 ` [Bug c++/107791] " pinskia at gcc dot gnu.org
2022-11-22 4:47 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2022-11-21 11:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107791
Bug ID: 107791
Summary: Spurious -Wunused warning for artificial variable
introduced for post contract
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
int f(int x) [[pre: x > 0]] [[post r: r > 0]]
{
return -5;
}
int main()
{
f(42);
}
$ g++20 fail.cc -fcontracts -Wunused
fail.cc: In function 'int f(int, int)':
fail.cc:1:45: warning: unused parameter '__r' [-Wunused-parameter]
1 | int f(int x) [[pre: x > 0]] [[post r: r > 0]]
| ^
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/107791] Spurious -Wunused warning for artificial variable introduced for post contract
2022-11-21 11:37 [Bug c++/107791] New: Spurious -Wunused warning for artificial variable introduced for post contract redi at gcc dot gnu.org
@ 2022-11-21 17:30 ` pinskia at gcc dot gnu.org
2022-11-22 4:47 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-21 17:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107791
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-11-21
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/107791] Spurious -Wunused warning for artificial variable introduced for post contract
2022-11-21 11:37 [Bug c++/107791] New: Spurious -Wunused warning for artificial variable introduced for post contract redi at gcc dot gnu.org
2022-11-21 17:30 ` [Bug c++/107791] " pinskia at gcc dot gnu.org
@ 2022-11-22 4:47 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-22 4:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107791
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |13.0
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed by r13-4223-gb20a3854c9f29.
https://gcc.gnu.org/pipermail/gcc-cvs/2022-November/374653.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-22 4:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 11:37 [Bug c++/107791] New: Spurious -Wunused warning for artificial variable introduced for post contract redi at gcc dot gnu.org
2022-11-21 17:30 ` [Bug c++/107791] " pinskia at gcc dot gnu.org
2022-11-22 4:47 ` pinskia 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).