On 5/21/19 2:18 PM, Bill Schmidt wrote:
On 5/21/19 11:47 AM, Martin Sebor wrote:
The GCC coding style says to use "floating-point" as an adjective
rather than "floating point." After enhancing the -Wformat-diag
checker to detect this I found a bunch of uses of the latter, such
as in:
gcc/c/c-decl.c:10944
gcc/c/c-parser.c:9423, 9446, 9450, etc.
gcc/convert.c:418, 422
gcc/cp/call.c:5070
gcc/cp/cvt.c:886
Before I fix them all and adjust the tests, I want to make sure
we really want to follow this rule. The C standard uses both
interchangeably. With just one exception, the C++ standard uses
the hyphenated form.
The hyphenated form is correct English, so I certainly prefer it. :-)
I agree and I'm changing the C/C++ FE diagnostics to match. I count
just 31 test that look for the unhyphenated form, and of those just
three under the gcc.target directory, so the fallout should be fairly
limited.
Thanks
Martin
PS As a heads up, below are the target-specific tests I found:
gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-5.c: return
(long long int) __builtin_vec_scalar_extract_sig (source); /* { dg-error
"requires ISA 3.0 IEEE 128-bit floating point" } */
gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-11.c: return
scalar_insert_exp (significand, exponent); /* { dg-error "requires ISA
3.0 IEEE 128-bit floating point" } */
gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-5.c: return
scalar_extract_exp (source); /* { dg-error "requires ISA 3.0 IEEE
128-bit floating point" } */