public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* C++ PATCH: Fix PR/7566
@ 2002-08-14 10:57 Gabriel Dos Reis
  2002-08-14 11:43 ` Mark Mitchell
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Dos Reis @ 2002-08-14 10:57 UTC (permalink / raw)
  To: gcc-patches; +Cc: mark


This one-liner fixes PR/7566 where warning_with_decl() was being misused.
Applied to mainline.

This is a regression from GCC-2.95.x series.  Mark, may I apply it to branch?

I discourage any use of {error, warning, pedwarn}_with_decl in any future
codes. 

-- Gaby
2002-08-14  Gabriel Dos Reis  <gdr@nerim.net>

	Fix PR/7566
	* c-semantics.c (genrtl_case_label): Don't (mis)use
	warning_with_decl. 

Index: c-semantics.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-semantics.c,v
retrieving revision 1.43
diff -p -r1.43 c-semantics.c
*** c-semantics.c	8 May 2002 09:17:16 -0000	1.43
--- c-semantics.c	14 Aug 2002 17:49:41 -0000
*************** genrtl_case_label (case_label)
*** 673,680 ****
    if (cleanup)
      {
        static int explained = 0;
!       warning_with_decl (TREE_PURPOSE (cleanup), 
! 			 "destructor needed for `%#D'");
        warning ("where case label appears here");
        if (!explained)
  	{
--- 673,679 ----
    if (cleanup)
      {
        static int explained = 0;
!       warning ("destructor needed for `%#D'", (TREE_PURPOSE (cleanup)));
        warning ("where case label appears here");
        if (!explained)
  	{

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: C++ PATCH: Fix PR/7566
  2002-08-14 10:57 C++ PATCH: Fix PR/7566 Gabriel Dos Reis
@ 2002-08-14 11:43 ` Mark Mitchell
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Mitchell @ 2002-08-14 11:43 UTC (permalink / raw)
  To: Gabriel Dos Reis, gcc-patches



--On Wednesday, August 14, 2002 07:56:43 PM +0200 Gabriel Dos Reis 
<gdr@nerim.net> wrote:

>
> This one-liner fixes PR/7566 where warning_with_decl() was being misused.
> Applied to mainline.
>
> This is a regression from GCC-2.95.x series.  Mark, may I apply it to
> branch?

Yes, after 3.2 goes out.

Thanks,

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-14 18:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-14 10:57 C++ PATCH: Fix PR/7566 Gabriel Dos Reis
2002-08-14 11:43 ` Mark Mitchell

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).