public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53129] New: Wself-assign
@ 2012-04-26 18:08 manu at gcc dot gnu.org
2012-04-26 18:13 ` [Bug c/53129] Wself-assign manu at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: manu at gcc dot gnu.org @ 2012-04-26 18:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53129
Bug #: 53129
Summary: Wself-assign
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: manu@gcc.gnu.org
void func()
{
int i = 2;
int x = 0; /* warn */
float f = 5.0;
double a[3];
i = i + 0; /* not warn */
f = f / 1; /* not warn */
a[1] = a[1]; /* warn */
i += 0; /* not warn */
x = x; /* warn */
}
manuel@gcc12:~$ clang -fsyntax-only -Wself-assign wselfassign.c
wselfassign.c:12:5: warning: explicitly assigning a variable of type 'int' to
itself [-Wself-assign]
x = x; /* warn */
~ ^ ~
1 warning generated.
An implementation was submitted to GCC but never approved here:
http://gcc.gnu.org/ml/gcc-patches/2010-06/msg02390.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/53129] Wself-assign
2012-04-26 18:08 [Bug c/53129] New: Wself-assign manu at gcc dot gnu.org
@ 2012-04-26 18:13 ` manu at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: manu at gcc dot gnu.org @ 2012-04-26 18:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53129
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
CC| |lcwu at gcc dot gnu.org
--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-04-26 18:12:52 UTC ---
Hi Le-Chun, I still think GCC wants this warning. Are you planning to submit a
new patch in the near future?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-26 18:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-26 18:08 [Bug c/53129] New: Wself-assign manu at gcc dot gnu.org
2012-04-26 18:13 ` [Bug c/53129] Wself-assign manu 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).