+2018-06-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * decl.c (bad_specifiers): Add const location_t* parameter and
+ use locations in error messages about 'inline' and 'virtual'.
+ (mark_inline_variable): Add location_t parameter and use it in
+ error_at and pedwarn messages.
+ (grokdeclarator): Use declspecs->locations[ds_constexpr],
+ declspecs->locations[ds_concept], declspecs->locations[ds_virtual],
+ declspecs->locations[ds_inline] in many error messages; adjust
+ bad_specifiers and mark_inline_variable calls.
+ (grokvardecl): Use declspecs->locations[ds_concept] in error message.
+
2018-06-22 Jason Merrill <jason@redhat.com>
PR c++/86219 - ICE with erroneous initializer in template.
int quals,
int inlinep,
int friendp,
- int raises)
+ int raises,
+ const location_t* locations)
{
switch (type)
{
case BSP_VAR:
if (virtualp)
- error ("%qD declared as a %<virtual%> variable", object);
+ error_at (locations[ds_virtual],
+ "%qD declared as a %<virtual%> variable", object);
if (quals)
error ("%<const%> and %<volatile%> function specifiers on "
"%qD invalid in variable declaration", object);
break;
case BSP_PARM:
if (virtualp)
- error ("%qD declared as a %<virtual%> parameter", object);
+ error_at (locations[ds_virtual],
+ "%qD declared as a %<virtual%> parameter", object);
if (inlinep)
- error ("%qD declared as an %<inline%> parameter", object);
+ error_at (locations[ds_inline],
+ "%qD declared as an %<inline%> parameter", object);
if (quals)
error ("%<const%> and %<volatile%> function specifiers on "
"%qD invalid in parameter declaration", object);
break;
case BSP_TYPE:
if (virtualp)
- error ("%qD declared as a %<virtual%> type", object);
+ error_at (locations[ds_virtual],
+ "%qD declared as a %<virtual%> type", object);
if (inlinep)
- error ("%qD declared as an %<inline%> type", object);
+ error_at (locations[ds_inline],
+ "%qD declared as an %<inline%> type", object);
if (quals)
error ("%<const%> and %<volatile%> function specifiers on "
"%qD invalid in type declaration", object);
break;
case BSP_FIELD:
if (virtualp)
- error ("%qD declared as a %<virtual%> field", object);
+ error_at (locations[ds_virtual],
+ "%qD declared as a %<virtual%> field", object);
if (inlinep)
- error ("%qD declared as an %<inline%> field", object);
+ error_at (locations[ds_inline],
+ "%qD declared as an %<inline%> field", object);
if (quals)
error ("%<const%> and %<volatile%> function specifiers on "
"%qD invalid in field declaration", object);
{
if (!processing_template_decl)
{
- error ("a non-template variable cannot be %<concept%>");
+ error_at (declspecs->locations[ds_concept],
+ "a non-template variable cannot be %<concept%>");
return NULL_TREE;
}
else
/* Handle declaring DECL as an inline variable. */
static void
-mark_inline_variable (tree decl)
+mark_inline_variable (tree decl, location_t loc)
{
bool inlinep = true;
if (! toplevel_bindings_p ())
{
- error ("%<inline%> specifier invalid for variable "
- "%qD declared at block scope", decl);
+ error_at (loc, "%<inline%> specifier invalid for variable "
+ "%qD declared at block scope", decl);
inlinep = false;
}
else if (cxx_dialect < cxx17)
- pedwarn (DECL_SOURCE_LOCATION (decl), 0,
- "inline variables are only available "
+ pedwarn (loc, 0, "inline variables are only available "
"with -std=c++17 or -std=gnu++17");
if (inlinep)
{
if (concept_p && typedef_p)
{
- error ("%<concept%> cannot appear in a typedef declaration");
+ error_at (declspecs->locations[ds_concept],
+ "%<concept%> cannot appear in a typedef declaration");
return error_mark_node;
}
if (constexpr_p && typedef_p)
{
- error ("%<constexpr%> cannot appear in a typedef declaration");
+ error_at (declspecs->locations[ds_constexpr],
+ "%<constexpr%> cannot appear in a typedef declaration");
return error_mark_node;
}
"ISO C++ forbids declaration of %qs with no type", name);
else
warning (OPT_Wreturn_type,
- "ISO C++ forbids declaration of %qs with no type", name);
+ "ISO C++ forbids declaration of %qs with no type", name);
if (type_was_error_mark_node && template_parm_flag)
/* FIXME we should be able to propagate the error_mark_node as is
/* Function parameters cannot be concept. */
if (concept_p)
- error ("a parameter cannot be declared %<concept%>");
+ error_at (declspecs->locations[ds_concept],
+ "a parameter cannot be declared %<concept%>");
/* Function parameters cannot be constexpr. If we saw one, moan
and pretend it wasn't there. */
else if (constexpr_p)
{
- error ("a parameter cannot be declared %<constexpr%>");
+ error_at (declspecs->locations[ds_constexpr],
+ "a parameter cannot be declared %<constexpr%>");
constexpr_p = 0;
}
}
explicitp = 2;
if (virtualp)
{
- permerror (input_location,
+ permerror (declspecs->locations[ds_virtual],
"constructors cannot be declared %<virtual%>");
virtualp = 0;
}
bad_specifiers (decl, BSP_TYPE, virtualp,
memfn_quals != TYPE_UNQUALIFIED,
- inlinep, friendp, raises != NULL_TREE);
+ inlinep, friendp, raises != NULL_TREE,
+ declspecs->locations);
if (decl_spec_seq_has_spec_p (declspecs, ds_alias))
/* Acknowledge that this was written:
bad_specifiers (decl, BSP_PARM, virtualp,
memfn_quals != TYPE_UNQUALIFIED,
- inlinep, friendp, raises != NULL_TREE);
+ inlinep, friendp, raises != NULL_TREE,
+ declspecs->locations);
}
else if (decl_context == FIELD)
{
ARM 9.5 */
if (virtualp && TREE_CODE (ctype) == UNION_TYPE)
{
- error ("function %qD declared %<virtual%> inside a union",
- unqualified_id);
+ error_at (declspecs->locations[ds_virtual],
+ "function %qD declared %<virtual%> inside a union",
+ unqualified_id);
return error_mark_node;
}
&& identifier_p (unqualified_id)
&& IDENTIFIER_NEWDEL_OP_P (unqualified_id))
{
- error ("%qD cannot be declared %<virtual%>, since it "
- "is always static", unqualified_id);
+ error_at (declspecs->locations[ds_virtual],
+ "%qD cannot be declared %<virtual%>, since it "
+ "is always static", unqualified_id);
virtualp = 0;
}
}
}
if (concept_p)
{
- error ("a destructor cannot be %<concept%>");
+ error_at (declspecs->locations[ds_concept],
+ "a destructor cannot be %<concept%>");
return error_mark_node;
}
if (constexpr_p)
{
- error ("a destructor cannot be %<constexpr%>");
+ error_at (declspecs->locations[ds_constexpr],
+ "a destructor cannot be %<constexpr%>");
return error_mark_node;
}
}
if (sfk == sfk_constructor)
if (concept_p)
{
- error ("a constructor cannot be %<concept%>");
+ error_at (declspecs->locations[ds_concept],
+ "a constructor cannot be %<concept%>");
return error_mark_node;
}
if (concept_p)
{
- error ("a concept cannot be a member function");
+ error_at (declspecs->locations[ds_concept],
+ "a concept cannot be a member function");
concept_p = false;
}
VAR_DECL, unqualified_id, type);
set_linkage_for_static_data_member (decl);
if (concept_p)
- error ("static data member %qE declared %<concept%>",
- unqualified_id);
+ error_at (declspecs->locations[ds_concept],
+ "static data member %qE declared %<concept%>",
+ unqualified_id);
else if (constexpr_p && !initialized)
{
error ("%<constexpr%> static data member %qD must have an "
}
if (inlinep)
- mark_inline_variable (decl);
+ mark_inline_variable (decl, declspecs->locations[ds_inline]);
if (!DECL_VAR_DECLARED_INLINE_P (decl)
&& !(cxx_dialect >= cxx17 && constexpr_p))
else
{
if (concept_p)
- error ("non-static data member %qE declared %<concept%>",
- unqualified_id);
+ error_at (declspecs->locations[ds_concept],
+ "non-static data member %qE declared %<concept%>",
+ unqualified_id);
else if (constexpr_p)
{
- error ("non-static data member %qE declared %<constexpr%>",
- unqualified_id);
+ error_at (declspecs->locations[ds_constexpr],
+ "non-static data member %qE declared %<constexpr%>",
+ unqualified_id);
constexpr_p = false;
}
decl = build_decl (input_location,
bad_specifiers (decl, BSP_FIELD, virtualp,
memfn_quals != TYPE_UNQUALIFIED,
staticp ? false : inlinep, friendp,
- raises != NULL_TREE);
+ raises != NULL_TREE,
+ declspecs->locations);
}
}
else if (TREE_CODE (type) == FUNCTION_TYPE
&& pedantic)
{
if (storage_class == sc_static)
- pedwarn (input_location, OPT_Wpedantic,
+ pedwarn (declspecs->locations[ds_storage_class], OPT_Wpedantic,
"%<static%> specifier invalid for function %qs "
"declared out of global scope", name);
else
- pedwarn (input_location, OPT_Wpedantic,
+ pedwarn (declspecs->locations[ds_inline], OPT_Wpedantic,
"%<inline%> specifier invalid for function %qs "
"declared out of global scope", name);
}
bad_specifiers (decl, BSP_VAR, virtualp,
memfn_quals != TYPE_UNQUALIFIED,
- inlinep, friendp, raises != NULL_TREE);
+ inlinep, friendp, raises != NULL_TREE,
+ declspecs->locations);
if (ctype)
{
}
if (inlinep)
- mark_inline_variable (decl);
+ mark_inline_variable (decl, declspecs->locations[ds_inline]);
if (innermost_code == cdk_decomp)
{
gcc_assert (declarator && declarator->kind == cdk_decomp);
+2018-06-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/concepts/locations1.C: New.
+ * g++.dg/cpp0x/locations1.C: Likewise.
+ * g++.dg/cpp1z/inline-var2.C: Test locations too.
+ * g++.dg/cpp1z/inline-var3.C: Likewise.
+
2018-06-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/86281
--- /dev/null
+// { dg-additional-options "-std=c++17 -fconcepts" }
+
+struct S
+{
+ concept S(); // { dg-error "3:a constructor cannot be .concept." }
+ concept int s = 1; // { dg-error "3:non-static data member .s. declared .concept." }
+ concept void foo(); // { dg-error "3:a concept cannot be a member function" }
+ concept ~S(); // { dg-error "3:a destructor cannot be .concept." }
+};
+
+typedef concept int my_int; // { dg-error "9:.concept. cannot appear in a typedef declaration" }
+
+void bar(concept int); // { dg-error "10:a parameter cannot be declared .concept." }
+
+concept int i = 0; // { dg-error "1:a non-template variable cannot be .concept." }
--- /dev/null
+// { dg-do compile { target c++11 } }
+
+void foo()
+{
+ static void bar1(); // { dg-error "3:.static. specifier invalid" }
+// { dg-error "3:cannot declare static function" "" { target *-*-* } .-1 }
+ inline void bar2(); // { dg-error "3:.inline. specifier invalid" }
+}
+
+struct S
+{
+ virtual S(); // { dg-error "3:constructors cannot be declared .virtual." }
+ constexpr int s = 1; // { dg-error "3:non-static data member .s. declared .constexpr." }
+ constexpr ~S(); // { dg-error "3:a destructor cannot be .constexpr." }
+};
+
+typedef constexpr int my_int; // { dg-error "9:.constexpr. cannot appear in a typedef declaration" }
+
+union U
+{
+ virtual void foo(); // { dg-error "3:function .foo. declared .virtual. inside a union" }
+};
+
+struct T
+{
+ virtual void operator delete(void*); // { dg-error "3:.operator delete. cannot be declared .virtual." }
+};
+
+void bar(constexpr int); // { dg-error "10:a parameter cannot be declared .constexpr." }
// { dg-do compile { target c++11 } }
// { dg-options "-Wdeprecated" }
-inline int var1 = 4; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
-static inline int var7 = 9; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+inline int var1 = 4; // { dg-warning "1:inline variables are only available with" "" { target c++14_down } }
+static inline int var7 = 9; // { dg-warning "8:inline variables are only available with" "" { target c++14_down } }
namespace N
{
- int inline var2; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- inline const int var6 = 8; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static inline double var8 = 2.0; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- extern inline char var10; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ int inline var2; // { dg-warning "7:inline variables are only available with" "" { target c++14_down } }
+ inline const int var6 = 8; // { dg-warning "3:inline variables are only available with" "" { target c++14_down } }
+ static inline double var8 = 2.0; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ extern inline char var10; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
}
struct S
{
static constexpr int var3 = 5;
- static inline int var4 = 6; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ static inline int var4 = 6; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
static constexpr int var5 = 7;
- static inline double var9 = 3.0; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static constexpr inline int var11 = 11; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ static inline double var9 = 3.0; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ static constexpr inline int var11 = 11; // { dg-warning "20:inline variables are only available with" "" { target c++14_down } }
};
const int S::var3; // { dg-warning "redundant redeclaration of" "" { target c++17 } }
const int S::var3; // { dg-error "redefinition of" "" { target c++14_down } }
extern int foo (int); // { dg-warning "redundant redeclaration of" "" { target c++17 } .-1 }
extern int bar (int);
struct T { T () { t = foo (3); } T (int x) { t = foo (x); } int t; };
-inline int var12 = foo (0); // { dg-warning "inline variables are only available with" "" { target c++14_down } }
-int inline var13 = foo (1); // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+inline int var12 = foo (0); // { dg-warning "1:inline variables are only available with" "" { target c++14_down } }
+int inline var13 = foo (1); // { dg-warning "5:inline variables are only available with" "" { target c++14_down } }
struct U
{
- static inline int var14 = foo (2); // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static inline T var15; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static inline T var16 = 4; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static int inline var17 = foo (5); // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ static inline int var14 = foo (2); // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ static inline T var15; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ static inline T var16 = 4; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ static int inline var17 = foo (5); // { dg-warning "14:inline variables are only available with" "" { target c++14_down } }
static constexpr double var18 = 4.0;
};
-extern inline int var19; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
-extern inline int var20; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+extern inline int var19; // { dg-warning "8:inline variables are only available with" "" { target c++14_down } }
+extern inline int var20; // { dg-warning "8:inline variables are only available with" "" { target c++14_down } }
int &ref19 = var19; // { dg-error "odr-used inline variable 'var19' is not defined" "" { target *-*-* } .-2 }
int sz20 = sizeof (var20);
struct V
{
- static struct A var21; // { dg-warning "inline variables are only available with" "" { target c++14_down } .+1 }
+ static struct A var21; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } .+1 }
static inline struct B var22; // { dg-error "has incomplete type" }
static inline struct C var23 = {}; // { dg-error "has incomplete type" }
-}; // { dg-warning "inline variables are only available with" "" { target c++14_down } .-1 }
+}; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } .-1 }
struct W
{
- static inline int var24; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static inline const int var25; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ static inline int var24; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ static inline const int var25; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
// { dg-error "uninitialized const" "" { target *-*-* } .-1 }
- static inline int var26 = 5; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static inline const int var27 = 6; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static inline double var28 = { 4.0 }; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static const inline double var29 = { 5.0 }; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ static inline int var26 = 5; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ static inline const int var27 = 6; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ static inline double var28 = { 4.0 }; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ static const inline double var29 = { 5.0 }; // { dg-warning "16:inline variables are only available with" "" { target c++14_down } }
};
int W::var24; // { dg-error "redefinition of" }
const int W::var25; // { dg-error "redefinition of" }
double const W::var29; // { dg-error "redefinition of" }
struct X
{
- inline int var30; // { dg-error "'var30' declared as an 'inline' field" }
+ inline int var30; // { dg-error "3:'var30' declared as an 'inline' field" }
};
-inline typedef int TT; // { dg-error "'TT' declared as an 'inline' type" }
+inline typedef int TT; // { dg-error "1:'TT' declared as an 'inline' type" }
int
-foo (inline int var31) // { dg-error "'var31' declared as an 'inline' parameter" }
+foo (inline int var31) // { dg-error "6:'var31' declared as an 'inline' parameter" }
{
- inline int var32; // { dg-error "'inline' specifier invalid for variable 'var32' declared at block scope" }
- static inline int var33; // { dg-error "'inline' specifier invalid for variable 'var33' declared at block scope" }
+ inline int var32; // { dg-error "3:'inline' specifier invalid for variable 'var32' declared at block scope" }
+ static inline int var33; // { dg-error "10:'inline' specifier invalid for variable 'var33' declared at block scope" }
return 0;
}
template <typename A, typename B, typename C>
struct Y
{
- static A var34; // { dg-warning "inline variables are only available with" "" { target c++14_down } .+1 }
+ static A var34; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } .+1 }
static inline B var35; // { dg-error "has incomplete type" }
static inline C var36; // { dg-error "has incomplete type" }
-}; // { dg-warning "inline variables are only available with" "" { target c++14_down } .-1 }
+}; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } .-1 }
struct A;
struct B;
struct C;
template <int N>
struct Z
{
- static inline int var37; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static inline const int var38; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ static inline int var37; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ static inline const int var38; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
// { dg-error "uninitialized const" "" { target *-*-* } .-1 }
- static inline int var39 = 5; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static inline const int var40 = 6; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static inline double var41 = { 4.0 }; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- static const inline double var42 = { 5.0 }; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ static inline int var39 = 5; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ static inline const int var40 = 6; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ static inline double var41 = { 4.0 }; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
+ static const inline double var42 = { 5.0 }; // { dg-warning "16:inline variables are only available with" "" { target c++14_down } }
static constexpr int var43 = 5;
- static constexpr inline int var44 = 5; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ static constexpr inline int var44 = 5; // { dg-warning "20:inline variables are only available with" "" { target c++14_down } }
};
template <int N>
int Z<N>::var37; // { dg-error "redefinition of" }
// aren't emitted into assembly even at -O0.
// { dg-final { scan-assembler-not "inlvarvariable" } }
-inline int inlvarvariable1 = 1; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
-const inline int inlvarvariable2 = 2; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+inline int inlvarvariable1 = 1; // { dg-warning "1:inline variables are only available with" "" { target c++14_down } }
+const inline int inlvarvariable2 = 2; // { dg-warning "7:inline variables are only available with" "" { target c++14_down } }
namespace N
{
- int inline inlvarvariable3; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
- const int inline inlvarvariable4 = 4; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ int inline inlvarvariable3; // { dg-warning "7:inline variables are only available with" "" { target c++14_down } }
+ const int inline inlvarvariable4 = 4; // { dg-warning "13:inline variables are only available with" "" { target c++14_down } }
}
struct S
{
- static inline double inlvarvariable5 = 5.0; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ static inline double inlvarvariable5 = 5.0; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
#if __cplusplus >= 201103L
static constexpr int inlvarvariable6 = 6;
- static inline constexpr int inlvarvariable7 = 7; // { dg-warning "inline variables are only available with" "" { target { c++11 && c++14_down } } }
+ static inline constexpr int inlvarvariable7 = 7; // { dg-warning "10:inline variables are only available with" "" { target { c++11 && c++14_down } } }
#endif
};
template <int N> // { dg-warning "variable templates only available with" "" { target c++11_down } .+1 }
-inline int inlvarvariable8; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+inline int inlvarvariable8; // { dg-warning "1:inline variables are only available with" "" { target c++14_down } }
template <int N> // { dg-warning "variable templates only available with" "" { target c++11_down } .+1 }
-const int inline inlvarvariable9 = 9; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+const int inline inlvarvariable9 = 9; // { dg-warning "11:inline variables are only available with" "" { target c++14_down } }
namespace N
{
template <int N> // { dg-warning "variable templates only available with" "" { target c++11_down } .+1 }
- int inline inlvarvariable10 = 10; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ int inline inlvarvariable10 = 10; // { dg-warning "7:inline variables are only available with" "" { target c++14_down } }
template <int N> // { dg-warning "variable templates only available with" "" { target c++11_down } .+1 }
- const inline double inlvarvariable11 = 11.0; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ const inline double inlvarvariable11 = 11.0; // { dg-warning "9:inline variables are only available with" "" { target c++14_down } }
}
template <int N>
struct T
{
- static inline int inlvarvariable12 = 12; // { dg-warning "inline variables are only available with" "" { target c++14_down } }
+ static inline int inlvarvariable12 = 12; // { dg-warning "10:inline variables are only available with" "" { target c++14_down } }
#if __cplusplus >= 201103L
static constexpr int inlvarvariable13 = 13;
- static inline constexpr double inlvarvariable14 = 14.0; // { dg-warning "inline variables are only available with" "" { target { c++11 && c++14_down } } }
+ static inline constexpr double inlvarvariable14 = 14.0; // { dg-warning "10:inline variables are only available with" "" { target { c++11 && c++14_down } } }
#endif
};
#if __cplusplus < 201103L