EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: -Werror=implicit-function-declaration by default?
From: Michael Davidsaver via Core-talk <core-talk at aps.anl.gov>
To: EPICS core-talk <core-talk at aps.anl.gov>
Date: Fri, 18 Dec 2020 09:41:24 -0800
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.

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).

My question is whether this should become a default for all builds?

(in WARN_CFLAGS_YES?)

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.

Replies:
Re: -Werror=implicit-function-declaration by default? Johnson, Andrew N. via Core-talk

Navigate by Date:
Prev: Re: [Merge] ~dirk.zimoch/epics-base:epicsMutexPriorityInheritance into epics-base:7.0 mdavidsaver via Core-talk
Next: Build failed: EPICS Base 3.15 base-3.15-27 AppVeyor via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Build failed: EPICS Base 3.15 base-3.15-26 AppVeyor via Core-talk
Next: Re: -Werror=implicit-function-declaration by default? Johnson, Andrew N. via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 18 Dec 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·