[Bug bootstrap/100730] New: h8300-linux: unused parameter, statement may fall through, control reaches end of non-void function
jbglaw@lug-owl.de
gcc-bugzilla@gcc.gnu.org
Sun May 23 12:37:42 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100730
Bug ID: 100730
Summary: h8300-linux: unused parameter, statement may fall
through, control reaches end of non-void function
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: jbglaw@lug-owl.de
Target Milestone: ---
Hi!
I started doing GCC testing again and found an issue with the h8/300 backend.
Used GCC is:
$ /usr/lib/gcc-snapshot/bin/gcc --version
gcc (Debian 20210320-1) 11.0.1 20210320 (experimental) [master revision
3279a9a5a9a:6526c452d22:5f256a70a05fcfc5a1caf56678ceb12b4f87f781]
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ /usr/lib/gcc-snapshot/bin/g++ --version
g++ (Debian 20210320-1) 11.0.1 20210320 (experimental) [master revision
3279a9a5a9a:6526c452d22:5f256a70a05fcfc5a1caf56678ceb12b4f87f781]
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Source tree is:
$ git show
warning: unable to access '/root/.config/git/attributes': Permission denied
warning: unable to access '/root/.config/git/attributes': Permission denied
commit c4771b3438a8cd9afcef1762957b763f8df3fa6e
Author: Andre Vehreschild <vehre@gcc.gnu.org>
Date: Sat May 22 13:36:31 2021 +0200
PR98301 Add missing changelog entries.
Building like so:
$ .../configure --target=h8300-linux --enable-werror-always
--enable-languages=all --prefix=/tmp/gcc-h8300-linux
$ make all-gcc
[...]
[all 2021-05-23 07:37:55] /usr/lib/gcc-snapshot/bin/g++ -fno-PIE -c -g -O2
-DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -I.
-I../.././gcc -I../.././gcc/. -I../.././gcc/../include
-I../.././gcc/../libcpp/include -I../.././gcc/../libcody
-I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/dpd
-I../libdecnumber -I../.././gcc/../libbacktrace -o h8300.o -MT h8300.o -MMD
-MP -MF ./.deps/h8300.TPo ../.././gcc/config/h8300/h8300.c
[all 2021-05-23 07:37:58] ../.././gcc/config/h8300/h8300.c: In function 'void
h8300_emit_stack_adjustment(int, long int, bool)':
[all 2021-05-23 07:37:58] ../.././gcc/config/h8300/h8300.c:455:65: error:
unused parameter 'in_prologue' [-Werror=unused-parameter]
[all 2021-05-23 07:37:58] 455 | h8300_emit_stack_adjustment (int sign,
HOST_WIDE_INT size, bool in_prologue)
[all 2021-05-23 07:37:58] |
~~~~~^~~~~~~~~~~
[all 2021-05-23 07:37:58] ../.././gcc/config/h8300/h8300.c: In function
'rtx_def* push(int, bool)':
[all 2021-05-23 07:37:58] ../.././gcc/config/h8300/h8300.c:514:20: error:
unused parameter 'in_prologue' [-Werror=unused-parameter]
[all 2021-05-23 07:37:58] 514 | push (int rn, bool in_prologue)
[all 2021-05-23 07:37:58] | ~~~~~^~~~~~~~~~~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c: In function 'const
char* output_plussi(rtx_def**, bool)':
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2707:11: error: this
statement may fall through [-Werror=implicit-fallthrough=]
[all 2021-05-23 07:37:59] 2707 | if (!need_flags)
[all 2021-05-23 07:37:59] | ^~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2710:9: note: here
[all 2021-05-23 07:37:59] 2710 | case 0xfffffffc:
[all 2021-05-23 07:37:59] | ^~~~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2711:11: error: this
statement may fall through [-Werror=implicit-fallthrough=]
[all 2021-05-23 07:37:59] 2711 | if (!need_flags)
[all 2021-05-23 07:37:59] | ^~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2714:9: note: here
[all 2021-05-23 07:37:59] 2714 | case 0x00010000:
[all 2021-05-23 07:37:59] | ^~~~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2716:11: error: this
statement may fall through [-Werror=implicit-fallthrough=]
[all 2021-05-23 07:37:59] 2716 | if (!need_flags)
[all 2021-05-23 07:37:59] | ^~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2722:9: note: here
[all 2021-05-23 07:37:59] 2722 | case 0xffff0000:
[all 2021-05-23 07:37:59] | ^~~~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c: In function
'unsigned int compute_plussi_length(rtx_def**, bool)':
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2792:11: error: this
statement may fall through [-Werror=implicit-fallthrough=]
[all 2021-05-23 07:37:59] 2792 | if (!need_flags)
[all 2021-05-23 07:37:59] | ^~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2795:9: note: here
[all 2021-05-23 07:37:59] 2795 | case 0xffff0000:
[all 2021-05-23 07:37:59] | ^~~~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c: In function 'int
h8300_shift_needs_scratch_p(int, machine_mode, rtx_code)':
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:4002:1: error:
control reaches end of non-void function [-Werror=return-type]
[all 2021-05-23 07:37:59] 4002 | }
[all 2021-05-23 07:37:59] | ^
[all 2021-05-23 07:38:08] cc1plus: all warnings being treated as errors
[all 2021-05-23 07:38:08] make[1]: *** [Makefile:2406: h8300.o] Error 1
[all 2021-05-23 07:38:08] make[1]: Leaving directory
'/var/lib/laminar/run/gcc-h8300-linux/1/gcc/host-x86_64-pc-linux-gnu/gcc'
[all 2021-05-23 07:38:08] make: *** [Makefile:4414: all-gcc] Error 2
More information about the Gcc-bugs
mailing list