This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

(C++) -Wold-style-cast tweak


1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>

	* decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
	casts in system headers or extern "C" blocks.

Index: decl2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl2.c,v
retrieving revision 1.222
diff -c -p -r1.222 decl2.c
*** decl2.c	1999/07/07 00:32:23	1.222
--- decl2.c	1999/07/09 19:39:38
*************** reparse_absdcl_as_casts (decl, expr)
*** 3818,3824 ****
        expr = build_c_cast (type, expr);
      }
  
!   if (warn_old_style_cast)
      warning ("use of old-style cast");
  
    return expr;
--- 3811,3818 ----
        expr = build_c_cast (type, expr);
      }
  
!   if (warn_old_style_cast && ! in_system_header
!       && current_lang_name != lang_name_c)
      warning ("use of old-style cast");
  
    return expr;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]