[c++-concepts] small tidbits to get it to build

Ed Smith-Rowland 3dw4rd@verizon.net
Wed Oct 23 02:23:00 GMT 2013


I had to get past two small bugs to get c++-concepts to build.
Take a good look because I'm not sure if they're right.  The solutions 
should be harmless though.

Ed

-------------- next part --------------

2013-10-23  Edward Smith-Rowland  <3dw4rd@verizon.net>

	make concepts build.
	* constraint.cc (make_constraints): Change variable assume to
	assumption.  Is assume a new keyword?
	* typeck.c (cp_build_function_call_vec): Use unused variable loc.
-------------- next part --------------
Index: constraint.cc
===================================================================
--- constraint.cc	(revision 203944)
+++ constraint.cc	(working copy)
@@ -522,16 +522,15 @@
   if (expr == error_mark_node)
     return error_mark_node;
 
-  // Decompose those expressions into lists of lists of atomic
-  // propositions.
-  tree assume = decompose_assumptions (expr);
+  // Decompose those expressions into lists of lists of atomic propositions.
+  tree assumption = decompose_assumptions (expr);
 
   // Build the constraint info.
   tree_constraint_info *cinfo = 
     (tree_constraint_info *)make_node (CONSTRAINT_INFO);
   cinfo->spelling = reqs;
   cinfo->requirements = expr;
-  cinfo->assumptions = assume;
+  cinfo->assumptions = assumption;
   return (tree)cinfo;
 }
 
@@ -1380,7 +1379,7 @@
   // Print the header for the requires expression.
   tree parms = TREE_OPERAND (subst, 0);
   if (!VOID_TYPE_P (TREE_VALUE (parms)))
-    inform (loc, "  requiring syntax with values %Z", TREE_OPERAND (subst, 0));
+    inform (loc, "  requiring syntax with values %qE", TREE_OPERAND (subst, 0));/*%Z*/
 
   // Create a new local specialization binding for the arguments. 
   // This lets us instantiate sub-expressions separately from the 
Index: typeck.c
===================================================================
--- typeck.c	(revision 203944)
+++ typeck.c	(working copy)
@@ -3445,7 +3445,7 @@
             {
               location_t loc = DECL_SOURCE_LOCATION (function);
               error ("%qD is not a viable candidate", function);
-              diagnose_constraints (input_location, tmpl, args);
+              diagnose_constraints (loc, tmpl, args);/*input_location*/
               return error_mark_node;
             }
         }


More information about the Gcc-patches mailing list