public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29185]  New: inconsistent warning: deleting array
@ 2006-09-22 16:36 sebor at roguewave dot com
  2006-09-22 16:43 ` [Bug c++/29185] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: sebor at roguewave dot com @ 2006-09-22 16:36 UTC (permalink / raw)
  To: gcc-bugs

Gcc 4.1.0 warns about the (ill-fomed?) delete expression on line 5 but fails
to issue a diagnostic for the similar expressions on lines 6 and 7. I would
like to request that it consistently diagnose all such cases.

$ cat t.cpp && gcc -c t.cpp
/*   1 */ int a [1];
/*   2 */ struct S { int a [1]; } s;
/*   3 */ 
/*   4 */ void foo (S *p) {
/*   5 */     delete a;
/*   6 */     delete s.a;
/*   7 */     delete p->a;
/*   8 */ }
t.cpp: In function 'void foo(S*)':
t.cpp:5: warning: deleting array 'int a [1]'


-- 
           Summary: inconsistent warning: deleting array
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebor at roguewave dot com
 GCC build triplet: all
  GCC host triplet: all
GCC target triplet: all


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29185


^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <bug-29185-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2012-05-23 14:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-22 16:36 [Bug c++/29185] New: inconsistent warning: deleting array sebor at roguewave dot com
2006-09-22 16:43 ` [Bug c++/29185] " pinskia at gcc dot gnu dot org
2006-09-22 16:44 ` pinskia at gcc dot gnu dot org
2006-09-22 16:57 ` sebor at roguewave dot com
2006-09-26 16:31 ` sebor at roguewave dot com
2006-09-26 17:42 ` pinskia at gcc dot gnu dot org
2006-09-26 18:56 ` sebor at roguewave dot com
2006-09-26 19:00   ` Andrew Pinski
2006-09-26 19:01 ` pinskia at physics dot uc dot edu
2006-09-26 21:43 ` sebor at roguewave dot com
2006-09-28 16:16 ` sebor at roguewave dot com
     [not found] <bug-29185-4@http.gcc.gnu.org/bugzilla/>
2012-05-23  1:31 ` paolo.carlini at oracle dot com
2012-05-23 14:20 ` paolo at gcc dot gnu.org
2012-05-23 14:20 ` paolo at gcc dot gnu.org
2012-05-23 14:35 ` paolo.carlini at oracle 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).