if (cxx_dialect < cxx23 && pedantic)
pedwarn (input_location, OPT_Wc__23_extensions,
"%<f%d%> or %<F%d%> suffix on floating constant only "
- "available with %<-std=c++2b%> or %<-std=gnu++2b%>",
+ "available with %<-std=c++23%> or %<-std=gnu++23%>",
n, n);
}
else
else if (cxx_dialect < cxx23 && pedantic)
pedwarn (input_location, OPT_Wc__23_extensions,
"%<bf16%> or %<BF16%> suffix on floating constant only "
- "available with %<-std=c++2b%> or %<-std=gnu++2b%>");
+ "available with %<-std=c++23%> or %<-std=gnu++23%>");
}
else if ((flags & CPP_N_WIDTH) == CPP_N_LARGE)
type = long_double_type_node;
error_at (DECL_SOURCE_LOCATION (decl),
"variable %qD of non-literal type %qT in "
"%<constexpr%> function only available with "
- "%<-std=c++2b%> or %<-std=gnu++2b%>", decl, type);
+ "%<-std=c++23%> or %<-std=gnu++23%>", decl, type);
explain_non_literal_class (type);
decl = error_mark_node;
}
return true;
else if (flags & tf_error)
constexpr_error (loc, fundef_p, "label definition in %<constexpr%> "
- "function only available with %<-std=c++2b%> or "
- "%<-std=gnu++2b%>");
+ "function only available with %<-std=c++23%> or "
+ "%<-std=gnu++23%>");
return false;
case ANNOTATE_EXPR:
if (CP_DECL_THREAD_LOCAL_P (decl) && !DECL_REALLY_EXTERN (decl))
error_at (DECL_SOURCE_LOCATION (decl),
"%qD defined %<thread_local%> in %qs function only "
- "available with %<-std=c++2b%> or %<-std=gnu++2b%>", decl,
+ "available with %<-std=c++23%> or %<-std=gnu++23%>", decl,
DECL_IMMEDIATE_FUNCTION_P (current_function_decl)
? "consteval" : "constexpr");
else if (TREE_STATIC (decl))
error_at (DECL_SOURCE_LOCATION (decl),
"%qD defined %<static%> in %qs function only available "
- "with %<-std=c++2b%> or %<-std=gnu++2b%>", decl,
+ "with %<-std=c++23%> or %<-std=gnu++23%>", decl,
DECL_IMMEDIATE_FUNCTION_P (current_function_decl)
? "consteval" : "constexpr");
else
{
pedwarn (omitted_parms_loc, OPT_Wc__23_extensions,
"parameter declaration before lambda declaration "
- "specifiers only optional with %<-std=c++2b%> or "
- "%<-std=gnu++2b%>");
+ "specifiers only optional with %<-std=c++23%> or "
+ "%<-std=gnu++23%>");
omitted_parms_loc = UNKNOWN_LOCATION;
}
/* Peek at the params, see if we have an xobj parameter. */
{
pedwarn (omitted_parms_loc, OPT_Wc__23_extensions,
"parameter declaration before lambda transaction "
- "qualifier only optional with %<-std=c++2b%> or "
- "%<-std=gnu++2b%>");
+ "qualifier only optional with %<-std=c++23%> or "
+ "%<-std=gnu++23%>");
omitted_parms_loc = UNKNOWN_LOCATION;
}
{
pedwarn (omitted_parms_loc, OPT_Wc__23_extensions,
"parameter declaration before lambda exception "
- "specification only optional with %<-std=c++2b%> or "
- "%<-std=gnu++2b%>");
+ "specification only optional with %<-std=c++23%> or "
+ "%<-std=gnu++23%>");
omitted_parms_loc = UNKNOWN_LOCATION;
}
if (omitted_parms_loc)
pedwarn (omitted_parms_loc, OPT_Wc__23_extensions,
"parameter declaration before lambda trailing "
- "return type only optional with %<-std=c++2b%> or "
- "%<-std=gnu++2b%>");
+ "return type only optional with %<-std=c++23%> or "
+ "%<-std=gnu++23%>");
cp_lexer_consume_token (parser->lexer);
return_type = cp_parser_trailing_type_id (parser);
}
if (cxx_dialect < cxx23)
pedwarn (loc, OPT_Wc__23_extensions,
"label at end of compound statement only available "
- "with %<-std=c++2b%> or %<-std=gnu++2b%>");
+ "with %<-std=c++23%> or %<-std=gnu++23%>");
return;
}
in_compound_for_pragma = false;
if (cxx_dialect < cxx23)
pedwarn (tok->location, OPT_Wc__23_extensions,
"%<if consteval%> only available with "
- "%<-std=c++2b%> or %<-std=gnu++2b%>");
+ "%<-std=c++23%> or %<-std=gnu++23%>");
bool save_in_consteval_if_p = in_consteval_if_p;
statement = begin_if_stmt ();
&& cxx_dialect < cxx23)
{
error ("%<goto%> in %<constexpr%> function only available with "
- "%<-std=c++2b%> or %<-std=gnu++2b%>");
+ "%<-std=c++23%> or %<-std=gnu++23%>");
cp_function_chain->invalid_constexpr = true;
}
else if (cxx_dialect < cxx23)
pedwarn (input_location, OPT_Wc__23_extensions,
"%<auto{x}%> only available with "
- "%<-std=c++2b%> or %<-std=gnu++2b%>");
+ "%<-std=c++23%> or %<-std=gnu++23%>");
type = do_auto_deduction (type, compound_literal, type, complain,
adc_variable_type);
if (type == error_mark_node)
else if (cxx_dialect < cxx23)
pedwarn (loc, OPT_Wc__23_extensions,
"%<auto(x)%> only available with "
- "%<-std=c++2b%> or %<-std=gnu++2b%>");
+ "%<-std=c++23%> or %<-std=gnu++23%>");
}
else
{