[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-time] time-1.8: building with gcc7 and --enable-gcc-warnings fa
Re: [Bug-time] time-1.8: building with gcc7 and --enable-gcc-warnings fails
Wed, 8 Nov 2017 13:52:05 -0700
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
On 2017-11-08 07:35 AM, Jim Meyering wrote:
Thanks a lot for reviving GNU time and for making a new release.
Sorry I didn't see this sooner:
src/time.c: In function 'getargs':
src/time.c:664:4: warning: this statement may fall through
src/time.c:665:2: note: here
Thanks for the report.
I wonder could this be a false-positive?
The function usage() never returns, it always calls exit(3),
and exit(3) is marked as "__attribute__ ((__noreturn__));".
If I specifically mark usage() as "noreturn",
the warning disappears.
Does gcc-7 not able to deduce the non-return-ness of usage() ?