===================================================================
@@ -0,0 +1,8 @@
+// { dg-options "-std=c++11" }
+
+void
+foo()
+{
+ float x = operator"" _F(); // { dg-error "was not declared in this scope" }
+ float y = 0_F; // { dg-error "unable to find numeric literal operator" }
+}
===================================================================
@@ -3563,6 +3563,8 @@
bool found = true;
tree fn = OVL_CURRENT (fns);
tree argtypes = NULL_TREE;
+ if (TREE_CODE (TREE_TYPE (fn)) != FUNCTION_TYPE)
+ return error_mark_node;
argtypes = TYPE_ARG_TYPES (TREE_TYPE (fn));
if (argtypes != NULL_TREE)
{