public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109384] New: unquoted keyword 'float' in format [-Werror=format-diag]
@ 2023-04-03 5:48 damian@riscv-rocks.de
2023-04-03 13:11 ` [Bug target/109384] " jakub at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: damian@riscv-rocks.de @ 2023-04-03 5:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109384
Bug ID: 109384
Summary: unquoted keyword 'float' in format
[-Werror=format-diag]
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: damian@riscv-rocks.de
Target Milestone: ---
Hello together,
i got the following build error gcc 13 current git:
/home/damian/data/gcc13built/./prev-gcc/xg++
-B/home/damian/data/gcc13built/./prev-gcc/
-B/usr/riscv64-linux-gnu/bin/ -nostdinc++
-B/home/damian/data/gcc13built/prev-riscv64-linux-gnu/libstdc++-v3/src/.libs
-B/home/damian/data/gcc13built/prev-riscv64-linux-gnu/libstdc++-v3/libsupc++/.libs
-I/home/damian/data/gcc13built/prev-riscv64-linux-gnu/libstdc++-v3/include/riscv64-linux-gnu
-I/home/damian/data/gcc13built/prev-riscv64-linux-gnu/libstdc++-v3/include
-I/home/damian/data/gcc/libstdc++-v3/libsupc++
-L/home/damian/data/gcc13built/prev-riscv64-linux-gnu/libstdc++-v3/src/.libs
-L/home/damian/data/gcc13built/prev-riscv64-linux-gnu/libstdc++-v3/libsupc++/.libs
-fno-PIE -c -g -O2 -fno-checking -gtoggle -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Wconditionally-supported -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/.
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include
-I../../gcc/gcc/../libcody -I../../gcc/gcc/../libdecnumber
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber
-I../../gcc/gcc/../libbacktrace -o riscv-common.o -MT riscv-common.o
-MMD -MP -MF ./.deps/riscv-common.TPo
../../gcc/gcc/common/config/riscv/riscv-common.cc
../../gcc/gcc/common/config/riscv/riscv-common.cc: In static member
function 'static riscv_subset_list* riscv_subset_list::parse(const
char*, location_t)':
../../gcc/gcc/common/config/riscv/riscv-common.cc:1158:48: error:
unquoted keyword 'float' in format [-Werror=format-diag]
1158 | "%<-march=%s%>: z*inx is conflict with float extensions",
Damian
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/109384] unquoted keyword 'float' in format [-Werror=format-diag]
2023-04-03 5:48 [Bug c++/109384] New: unquoted keyword 'float' in format [-Werror=format-diag] damian@riscv-rocks.de
@ 2023-04-03 13:11 ` jakub at gcc dot gnu.org
2023-04-03 13:11 ` [Bug target/109384] [13 Regression] " jakub at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-04-03 13:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109384
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |jiawei at iscas dot ac.cn,
| |kito at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The formatting of the r13-6930-gb2f327b9be81326c9e59 patch is also incorrect
(missing spaces before (, wrong indentation.
The wording should probably use floating-point extensions because that is how
the RISCV extensions are called.
The point of the warning is make sure float which is typically a keyword is
quoted, e.g.
%<float%> .
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/109384] [13 Regression] unquoted keyword 'float' in format [-Werror=format-diag]
2023-04-03 5:48 [Bug c++/109384] New: unquoted keyword 'float' in format [-Werror=format-diag] damian@riscv-rocks.de
2023-04-03 13:11 ` [Bug target/109384] " jakub at gcc dot gnu.org
@ 2023-04-03 13:11 ` jakub at gcc dot gnu.org
2023-04-03 13:13 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-04-03 13:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109384
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|unquoted keyword 'float' in |[13 Regression] unquoted
|format |keyword 'float' in format
|[-Werror=format-diag] |[-Werror=format-diag]
Target Milestone|--- |13.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/109384] [13 Regression] unquoted keyword 'float' in format [-Werror=format-diag]
2023-04-03 5:48 [Bug c++/109384] New: unquoted keyword 'float' in format [-Werror=format-diag] damian@riscv-rocks.de
2023-04-03 13:11 ` [Bug target/109384] " jakub at gcc dot gnu.org
2023-04-03 13:11 ` [Bug target/109384] [13 Regression] " jakub at gcc dot gnu.org
@ 2023-04-03 13:13 ` jakub at gcc dot gnu.org
2023-04-03 16:17 ` damian@riscv-rocks.de
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-04-03 13:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109384
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
And something is conflict with something_else is incorrect grammar, so
%<-march=%s%>: z*inx conflicts with floating-point extensions ?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/109384] [13 Regression] unquoted keyword 'float' in format [-Werror=format-diag]
2023-04-03 5:48 [Bug c++/109384] New: unquoted keyword 'float' in format [-Werror=format-diag] damian@riscv-rocks.de
` (2 preceding siblings ...)
2023-04-03 13:13 ` jakub at gcc dot gnu.org
@ 2023-04-03 16:17 ` damian@riscv-rocks.de
2023-04-04 9:24 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: damian@riscv-rocks.de @ 2023-04-03 16:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109384
--- Comment #3 from Damian <damian@riscv-rocks.de> ---
Hello Jakub,
withe the change "%<-march=%s%>: z*inx conflicts with floating-point extensions
?"
the build works again
Best regards
Damian
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/109384] [13 Regression] unquoted keyword 'float' in format [-Werror=format-diag]
2023-04-03 5:48 [Bug c++/109384] New: unquoted keyword 'float' in format [-Werror=format-diag] damian@riscv-rocks.de
` (3 preceding siblings ...)
2023-04-03 16:17 ` damian@riscv-rocks.de
@ 2023-04-04 9:24 ` cvs-commit at gcc dot gnu.org
2023-04-04 9:25 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-04 9:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109384
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:840354060e23ff28d325af2b8422233ce14f40f8
commit r13-6997-g840354060e23ff28d325af2b8422233ce14f40f8
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Apr 4 11:20:28 2023 +0200
riscv: Fix bootstrap [PR109384]
The following patch unbreaks riscv bootstrap, where it previously failed
on -Werror=format-diag warning promoted to error.
Ok for trunk?
Or shall it say e.g.
"%<-march=%s%>: %<zfinx%> extension conflicts with %<f>"
?
Or say if the current condition is true, do
const char *ext = "zfinx";
if (subset_list->lookup ("zdinx"))
ext = "zdinx";
else if (subset_list->lookup ("zhinx"))
ext = "zhinx";
else if (subset_list->lookup ("zhinxmin"))
ext = "zhinxmin";
and
"%<-march=%s%>: %qs extension conflicts with %<f>", arch, ext
? Or do similar check for which extension to print against it,
const char *ext = "zfinx";
const char *ext2 = "f";
if (subset_list->lookup ("zdinx"))
{
ext = "zdinx";
if (subset_list->lookup ("d"))
ext2 = "d";
}
else if (subset_list->lookup ("zhinx"))
{
ext = "zhinx";
if (subset_list->lookup ("zfh"))
ext2 = "zfh";
}
else if (subset_list->lookup ("zhinxmin"))
{
ext = "zhinxmin";
if (subset_list->lookup ("zfhmin"))
ext2 = "zfhmin";
}
"%<-march=%s%>: %qs extension conflicts with %qs", arch, ext, ext2
?
2023-04-04 Jakub Jelinek <jakub@redhat.com>
PR target/109384
* common/config/riscv/riscv-common.cc (riscv_subset_list::parse):
Reword diagnostics about zfinx conflict with f, formatting fixes.
* gcc.target/riscv/arch-19.c: Expect a different message about
zfinx
vs. f conflict.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/109384] [13 Regression] unquoted keyword 'float' in format [-Werror=format-diag]
2023-04-03 5:48 [Bug c++/109384] New: unquoted keyword 'float' in format [-Werror=format-diag] damian@riscv-rocks.de
` (4 preceding siblings ...)
2023-04-04 9:24 ` cvs-commit at gcc dot gnu.org
@ 2023-04-04 9:25 ` jakub at gcc dot gnu.org
2023-04-04 19:19 ` damian@riscv-rocks.de
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-04-04 9:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109384
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Should be fixed now.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/109384] [13 Regression] unquoted keyword 'float' in format [-Werror=format-diag]
2023-04-03 5:48 [Bug c++/109384] New: unquoted keyword 'float' in format [-Werror=format-diag] damian@riscv-rocks.de
` (5 preceding siblings ...)
2023-04-04 9:25 ` jakub at gcc dot gnu.org
@ 2023-04-04 19:19 ` damian@riscv-rocks.de
2023-04-04 19:21 ` damian@riscv-rocks.de
2023-04-06 2:54 ` jiawei at iscas dot ac.cn
8 siblings, 0 replies; 10+ messages in thread
From: damian@riscv-rocks.de @ 2023-04-04 19:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109384
--- Comment #6 from Damian <damian@riscv-rocks.de> ---
Hello Jakub,
many thanks for you help :-)
Damian
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/109384] [13 Regression] unquoted keyword 'float' in format [-Werror=format-diag]
2023-04-03 5:48 [Bug c++/109384] New: unquoted keyword 'float' in format [-Werror=format-diag] damian@riscv-rocks.de
` (6 preceding siblings ...)
2023-04-04 19:19 ` damian@riscv-rocks.de
@ 2023-04-04 19:21 ` damian@riscv-rocks.de
2023-04-06 2:54 ` jiawei at iscas dot ac.cn
8 siblings, 0 replies; 10+ messages in thread
From: damian@riscv-rocks.de @ 2023-04-04 19:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109384
Damian <damian@riscv-rocks.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #7 from Damian <damian@riscv-rocks.de> ---
Hello Jakup,
build tested and it works.
Many thanks
Damian
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/109384] [13 Regression] unquoted keyword 'float' in format [-Werror=format-diag]
2023-04-03 5:48 [Bug c++/109384] New: unquoted keyword 'float' in format [-Werror=format-diag] damian@riscv-rocks.de
` (7 preceding siblings ...)
2023-04-04 19:21 ` damian@riscv-rocks.de
@ 2023-04-06 2:54 ` jiawei at iscas dot ac.cn
8 siblings, 0 replies; 10+ messages in thread
From: jiawei at iscas dot ac.cn @ 2023-04-06 2:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109384
--- Comment #8 from jiawei <jiawei at iscas dot ac.cn> ---
Thank you for this fix, I neglected to confirm the format, sorry for that.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-04-06 2:54 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-03 5:48 [Bug c++/109384] New: unquoted keyword 'float' in format [-Werror=format-diag] damian@riscv-rocks.de
2023-04-03 13:11 ` [Bug target/109384] " jakub at gcc dot gnu.org
2023-04-03 13:11 ` [Bug target/109384] [13 Regression] " jakub at gcc dot gnu.org
2023-04-03 13:13 ` jakub at gcc dot gnu.org
2023-04-03 16:17 ` damian@riscv-rocks.de
2023-04-04 9:24 ` cvs-commit at gcc dot gnu.org
2023-04-04 9:25 ` jakub at gcc dot gnu.org
2023-04-04 19:19 ` damian@riscv-rocks.de
2023-04-04 19:21 ` damian@riscv-rocks.de
2023-04-06 2:54 ` jiawei at iscas dot ac.cn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).