On 24 Oct 2022 19:47, Tsukasa OI wrote: > On 2022/10/23 22:59, Mike Frysinger wrote: > > On 20 Oct 2022 09:32, Tsukasa OI wrote: > >> Clang generates a warning if there is a function declaration/definition > >> with zero arguments. Such declarations/definitions without a prototype (an > >> argument list) are deprecated forms of indefinite arguments > >> ("-Wdeprecated-non-prototype"). On the default configuration, it causes a > >> build failure (unless "--disable-werror" is specified). > >> > >> Such getrusage function declarations are placed in three files under sim/ppc > >> and to avoid defining those on the modern environments, this commit will > >> make the configuration script to find the known declaration of getrusage > >> and defines HAVE_DECL_GETRUSAGE if it finds one. > >> > >> If we find one (and we *will* in most modern environments), we don't need > >> to rely on the deprecated declarations. > >> --- > >> sim/config.h.in | 4 ++++ > >> sim/configure | 32 ++++++++++++++++++++++++++++++++ > >> sim/configure.ac | 10 ++++++++++ > >> 3 files changed, 46 insertions(+) > > > > you didn't actually fix the bad prototypes in the ppc code -- just delete them. > > pretty sure once you do, you won't need any of these changes. > > I wasn't sure that we could remove getrusage declarations without > prototype because it drops support for *really* old environments. If we > can "just" remove getrusage declarations (it seems you are okay with > it), that will get definitely simpler. the GNU sim documentation says we require an ISO C11 compiler & corresponding runtime. if such a system exists that someone cares about, they can propose a patch & corresponding documentation. putting bandaids on bandaids that we can't test isn't really sustainable. -mike