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: get --enable-mapped-location building


This patch gets GCC buidling with --enable-mapped-location building
again.  I've only done minimal testing as, by inspection, it cannot
affect builds unless --enable-mapped-location is passed to configure.
Okay for mainline?

Ben

2006-11-02  Ben Elliston  <bje@au.ibm.com>

        * tree-ssa.c (warn_uninit): Add special locus handling when
        USE_MAPPED_LOCATION is defined.

Index: tree-ssa.c
===================================================================
--- tree-ssa.c  (revision 118397)
+++ tree-ssa.c  (working copy)
@@ -1179,9 +1179,15 @@ warn_uninit (tree t, const char *gmsgid,
           : &DECL_SOURCE_LOCATION (var));
   warning (0, gmsgid, locus, var);
   fun_locus = &DECL_SOURCE_LOCATION (cfun->decl);
+#ifdef USE_MAPPED_LOCATION
+  if (LOCATION_FILE (*locus) != LOCATION_FILE (*fun_locus)
+      || LOCATION_LINE (*locus) < LOCATION_LINE (*fun_locus)
+      || LOCATION_LINE (*locus) > LOCATION_LINE (cfun->function_end_locus))
+#else
   if (locus->file != fun_locus->file
       || locus->line < fun_locus->line
       || locus->line > cfun->function_end_locus.line)
+#endif
     inform ("%J%qD was declared here", var, var);
 
   TREE_NO_WARNING (var) = 1;


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