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]
Other format: [Raw text]

Patch ping [part 2/3]


This is a ping for the diagnostic/attribute bits of
http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01004.html
This can go in separately from the other parts.

(I needed to include toplev.h in c-tree.h so that ATTRIBUTE_GCC_DIAG
was defined where necessary for 'diagnostic_set_info'.)

Okay for mainline?

		Thanks,
		--Kaveh

2005-07-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* Makefile.in (C_TREE_H): Update dependencies.
	* c-tree.h: Include toplev.h.
	* diagnostic.h (diagnostic_set_info): Add format attribute.
	* rtl-error.c (diagnostic_for_asm): Likewise.
	
diff -rup orig/egcc-CVS20050713/gcc/Makefile.in egcc-CVS20050713/gcc/Makefile.in
--- orig/egcc-CVS20050713/gcc/Makefile.in	2005-07-10 00:04:48.000000000 -0400
+++ egcc-CVS20050713/gcc/Makefile.in	2005-07-14 10:00:09.000000000 -0400
@@ -738,7 +738,7 @@ TIMEVAR_H = timevar.h timevar.def
 INSN_ATTR_H = insn-attr.h $(srcdir)/insn-addr.h $(srcdir)/varray.h
 C_COMMON_H = c-common.h $(SPLAY_TREE_H) $(CPPLIB_H) $(GGC_H)
 C_PRAGMA_H = c-pragma.h $(CPPLIB_H)
-C_TREE_H = c-tree.h $(C_COMMON_H)
+C_TREE_H = c-tree.h $(C_COMMON_H) toplev.h $(DIAGNOSTIC_H)
 SYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h
 PREDICT_H = predict.h predict.def
 CPPLIB_H = $(srcdir)/../libcpp/include/line-map.h \
diff -rup orig/egcc-CVS20050713/gcc/c-tree.h egcc-CVS20050713/gcc/c-tree.h
--- orig/egcc-CVS20050713/gcc/c-tree.h	2005-07-05 22:33:14.000000000 -0400
+++ egcc-CVS20050713/gcc/c-tree.h	2005-07-14 10:00:09.000000000 -0400
@@ -23,6 +23,7 @@ Software Foundation, 51 Franklin Street,
 #define GCC_C_TREE_H
 
 #include "c-common.h"
+#include "toplev.h"
 #include "diagnostic.h"
 
 /* struct lang_identifier is private to c-decl.c, but langhooks.c needs to
diff -rup orig/egcc-CVS20050713/gcc/diagnostic.h egcc-CVS20050713/gcc/diagnostic.h
--- orig/egcc-CVS20050713/gcc/diagnostic.h	2005-06-30 21:23:37.000000000 -0400
+++ egcc-CVS20050713/gcc/diagnostic.h	2005-07-14 10:00:09.000000000 -0400
@@ -181,8 +181,10 @@ extern void diagnostic_report_current_mo
 extern void diagnostic_report_current_function (diagnostic_context *);
 extern void diagnostic_report_diagnostic (diagnostic_context *,
 					  diagnostic_info *);
+#ifdef ATTRIBUTE_GCC_DIAG
 extern void diagnostic_set_info (diagnostic_info *, const char *, va_list *,
-				 location_t, diagnostic_t);
+				 location_t, diagnostic_t) ATTRIBUTE_GCC_DIAG(2,0);
+#endif
 extern char *diagnostic_build_prefix (diagnostic_info *);
 
 /* Pure text formatting support functions.  */
diff -rup orig/egcc-CVS20050713/gcc/rtl-error.c egcc-CVS20050713/gcc/rtl-error.c
--- orig/egcc-CVS20050713/gcc/rtl-error.c	2005-06-25 22:37:22.000000000 -0400
+++ egcc-CVS20050713/gcc/rtl-error.c	2005-07-14 10:00:09.000000000 -0400
@@ -34,7 +34,7 @@ Boston, MA 02110-1301, USA.  */
 #include "diagnostic.h"
 
 static location_t location_for_asm (rtx);
-static void diagnostic_for_asm (rtx, const char *, va_list *, diagnostic_t);
+static void diagnostic_for_asm (rtx, const char *, va_list *, diagnostic_t) ATTRIBUTE_GCC_DIAG(2,0);
 
 /* Figure the location of the given INSN.  */
 static location_t


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