This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(C++) -Wold-style-cast tweak
- To: egcs-patches at egcs dot cygnus dot com
- Subject: (C++) -Wold-style-cast tweak
- From: Jason Merrill <jason at cygnus dot com>
- Date: Fri, 9 Jul 1999 12:43:43 -0700
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;