{
int angle_brackets;
struct cpp_embed_params params = {};
- bool ok;
+ bool ok, warned = false;
const char *fname = NULL;
/* Tell the lexer this is an embed directive. */
if (CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, embed))
{
if (CPP_OPTION (pfile, cplusplus))
- cpp_error (pfile, CPP_DL_PEDWARN,
- "%<#%s%> is a GCC extension", "embed");
+ warned = cpp_pedwarning (pfile, CPP_W_CXX26_EXTENSIONS,
+ "%<#%s%> before C++26 is a GCC extension",
+ "embed");
else
- cpp_error (pfile, CPP_DL_PEDWARN,
- "%<#%s%> before C23 is a GCC extension", "embed");
+ warned = cpp_pedwarning (pfile, CPP_W_PEDANTIC,
+ "%<#%s%> before C23 is a GCC extension",
+ "embed");
}
+ if (!warned && CPP_OPTION (pfile, cpp_warn_c11_c23_compat) > 0)
+ cpp_warning (pfile, CPP_W_C11_C23_COMPAT,
+ "%<#%s%> is a C23 feature", "embed");
fname = parse_include (pfile, &angle_brackets, NULL, ¶ms.loc);
if (!fname)
/* CXX20 */ { 1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,0,1,0,0,1 },
/* GNUCXX23 */ { 1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,0,0,1 },
/* CXX23 */ { 1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,0,0,1 },
- /* GNUCXX26 */ { 1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,0,0,1 },
- /* CXX26 */ { 1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,0,0,1 },
+ /* GNUCXX26 */ { 1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,1,0,1 },
+ /* CXX26 */ { 1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,1,0,1 },
/* ASM */ { 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
};