Experimental Physics and Industrial Control System
|
On Dec 18, 2020, at 11:41 AM, Michael Davidsaver via Core-talk < core-talk at aps.anl.gov> wrote:
I'd like to start treating calls to undeclared functions in C as errors,
at least in CI builds. This has long been an error in c++, but is only
a warning with C.
No major objections from here.
I can easily add this only for the CI jobs w/ GCC with:
cat <<EOF >> configure/CONFIG_SITE.local
USR_CFLAGS += -Werror-implicit-function-declaration
EOF
Note: the newer -Werror=* syntax was added with GCC 4.2. As of 8.3
the older flag is still recognized (thank you GCC).
VxWorks 6.8 (gcc 4.1.3) doesn’t list -Werror= as supported but does show Werror-implicit-function-declaration as you say.
My question is whether this should become a default for all builds?
(in WARN_CFLAGS_YES?)
For gcc builds I think yes (so in configure/CONFIG.gnuCommon).
My inclination is yes. I've certainly never intended to rely on an implicit
declaration, but have occasionally done so unwittingly as a result of
a missing #include.
Ditto, nowadays we shouldn’t have any code using implicits (of any sort).
- Andrew
--
Complexity comes for free, simplicity you have to work for.
|
- Replies:
- Re: -Werror=implicit-function-declaration by default? Ralph Lange via Core-talk
- References:
- -Werror=implicit-function-declaration by default? Michael Davidsaver via Core-talk
- Navigate by Date:
- Prev:
Build failed: EPICS Base 3.15 base-3.15-27 AppVeyor via Core-talk
- Next:
Build failed: EPICS Base 3.15 base-3.15-28 AppVeyor via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
-Werror=implicit-function-declaration by default? Michael Davidsaver via Core-talk
- Next:
Re: -Werror=implicit-function-declaration by default? Ralph Lange via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
|
ANJ, 20 Dec 2020 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|