Message ID | 20240504150446.473575-4-ben.boeckel@kitware.com |
---|---|
State | New |
Headers | show |
Series | P1689 followup fixes | expand |
On Sat, 4 May 2024, Ben Boeckel wrote: > diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc > index be3058dca63..4a164ad0c0b 100644 > --- a/gcc/c-family/c-opts.cc > +++ b/gcc/c-family/c-opts.cc > @@ -370,7 +370,7 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, > if (!strcmp (arg, "p1689r5")) > cpp_opts->deps.fdeps_format = FDEPS_FMT_P1689R5; > else > - error ("%<-fdeps-format=%> unknown format %<%s%>", arg); > + error ("%<-fdeps-format=%> unknown format %q", arg); > break; That can't be right. The GCC %q is a modifier that needs to have an actual format specifier it modifies (so %qs - which produces the same output as %<%s%> - but not %q by itself).
On Tue, May 07, 2024 at 21:15:09 +0000, Joseph Myers wrote: > That can't be right. The GCC %q is a modifier that needs to have an > actual format specifier it modifies (so %qs - which produces the same > output as %<%s%> - but not %q by itself). Yes, I got CI results of failure and noticed that I had prepared the patches on my laptop, but when I investigated, I had done additional work on my desktop concurrently I had not pulled back (it builds GCC in a…reasonable time comparatively) which did have the `%qs` change, but I've not gotten around to running the test suite again (or reporting back here). I have another patch revision in the works. Thanks, --Ben
diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc index be3058dca63..4a164ad0c0b 100644 --- a/gcc/c-family/c-opts.cc +++ b/gcc/c-family/c-opts.cc @@ -370,7 +370,7 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, if (!strcmp (arg, "p1689r5")) cpp_opts->deps.fdeps_format = FDEPS_FMT_P1689R5; else - error ("%<-fdeps-format=%> unknown format %<%s%>", arg); + error ("%<-fdeps-format=%> unknown format %q", arg); break; case OPT_fdeps_file_:
Fixes: 024f135a1e9 (p1689r5: initial support, 2023-09-01) Reported-by: Roland Illig <roland.illig@gmx.de> gcc/c-family/ * c-opts.cc (c_common_handle_option): Fix quoting in `-fdeps-format=` unrecognized parameter error message. Signed-off-by: Ben Boeckel <ben.boeckel@kitware.com> --- gcc/c-family/c-opts.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)