On Sat, 26 May 2018, Will Hawkins wrote:
> > + if (asmspec_tree != NULL_TREE)
> > + {
> > + warning (OPT_Wignored_asm_name, "asm-specifier is ignored in "
> > + "typedef declaration");
> > + }
We avoid braces around a single statement like this.
I don't think diagnostics generally use hyphenated syntax production names
like asm-specifier. Rather, the hyphens are omitted, and literal code
enclosed in quotes, so "%<asm%> specifier" (and %<typedef%>).
> > + warning (OPT_Wignored_asm_name, "asm-specifier is ignored for "
> > + "typedef declarations");
Please use the same wording for C and C++ to save work for translators
(thus, don't say "declaration" in one and "declarations" in the other, or
"in" in one and "for" in the other, unless there is a concrete reason
related to the languages to need a difference).
> > +Warn when an assembler name is given but ignored. For C and C++, this
> > +happens when a @code{typdef} declaration is given an assembler name.
typedef, not typdef.
> > diff --git a/gcc/testsuite/g++.dg/asm-pr85444.C
I think you should put the test in c-c++-common if possible.
--
Joseph S. Myers
[email protected]