Message ID | 20190316214018.9398-3-shorne@gmail.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 71532 invoked by alias); 16 Mar 2019 21:40:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 71468 invoked by uid 89); 16 Mar 2019 21:40:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Spam-Relays-External:209.85.215.196, notices, H*RU:209.85.215.196, H*r:sk:mail-pg X-HELO: mail-pg1-f196.google.com Received: from mail-pg1-f196.google.com (HELO mail-pg1-f196.google.com) (209.85.215.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 16 Mar 2019 21:40:35 +0000 Received: by mail-pg1-f196.google.com with SMTP id v12so8809901pgq.1 for <gdb-patches@sourceware.org>; Sat, 16 Mar 2019 14:40:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8mqoncXaYMdph6jGxaArSy3Kp2Ui/qnSo1ILWGjrZ2A=; b=WjoEzvK/o/JS5Rn0LwCt8jBUlVuVjMU3KluNy54nXPXfCthHyiAWFhQGFZ0ZF+WT2i UcXw4EJIGbpLlpBmH6Np/dkY4F9HvHj1bYS3md8Z+JeOdVahZBA+c/gHV6ps2iSgR7uY lGVivb1atu5kzFH9z2wwyKk6r2O0gELJ22e/vdfJCQlj72MZmaGB8gzxg7HTwcZsRwUZ Twvm+HJ2mDQK9Blxeu4CI3oG/IM8VQwtOiPme3kTi1t459ESnIYx+hZCv7swZauXVSSS P9bfvas8nGYpOheP6UywH3LuKjfljBNeIicSvAjQ/FAotMIW/iUwbGYONNHncg+S6+n/ wKZg== Return-Path: <shorne@gmail.com> Received: from localhost (g203.124-44-7.ppp.wakwak.ne.jp. [124.44.7.203]) by smtp.gmail.com with ESMTPSA id 20sm7041568pgr.80.2019.03.16.14.40.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Mar 2019 14:40:32 -0700 (PDT) From: Stafford Horne <shorne@gmail.com> To: GDB patches <gdb-patches@sourceware.org> Cc: Simon Marchi <simon.marchi@polymtl.ca>, Stafford Horne <shorne@gmail.com> Subject: [PATCH v2 2/2] sim/common: Fix warnings: "warning: implicit declaration of function..." Date: Sun, 17 Mar 2019 06:40:18 +0900 Message-Id: <20190316214018.9398-3-shorne@gmail.com> In-Reply-To: <20190316214018.9398-1-shorne@gmail.com> References: <20190316214018.9398-1-shorne@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes |
Commit Message
Stafford Horne
March 16, 2019, 9:40 p.m. UTC
During building of several cgen simulator's I notices the below warnings. Adding includes fixes these. Including config.h allows stdio.h to properly configure itself to expose asprintf(). The other warnings for abort, free, memset, strlen are trivial. Warnings: ../../../binutils-gdb/sim/or1k/../common/sim-watch.c: In function ‘sim_watchpoint_install’: ../../../binutils-gdb/sim/or1k/../common/sim-watch.c:415:10: warning: implicit declaration of function ‘asprintf’; did you mean ‘vasprintf’? [-Wimplicit-function-declaration] if (asprintf (&name, "watch-%s-%s", ^~~~~~~~ vasprintf ../../../binutils-gdb/sim/lm32/../common/hw-device.c: In function ‘hw_strdup’: ../../../binutils-gdb/sim/lm32/../common/hw-device.c:59:34: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration] char *dup = hw_zalloc (me, strlen (str) + 1); ^~~~~~ ../../../binutils-gdb/sim/lm32/../common/hw-events.c: In function ‘hw_event_queue_schedule’: ../../../binutils-gdb/sim/lm32/../common/hw-events.c:92:3: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration] memset (&dummy, 0, sizeof dummy); ^~~~~~ ../../../binutils-gdb/sim/lm32/../common/hw-handles.c: In function ‘hw_handle_remove_ihandle’: ../../../binutils-gdb/sim/lm32/../common/hw-handles.c:211:4: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration] free (delete); ^~~~ ../../../binutils-gdb/sim/lm32/../common/sim-fpu.c: In function ‘pack_fpu’: ../../../binutils-gdb/sim/lm32/../common/sim-fpu.c:292:7: warning: implicit declaration of function ‘abort’ [-Wimplicit-function-declaration] abort (); ^~~~~ sim/common/ChangeLog: * sim-options.c: Include "config.h". Include <stdio.h>. * sim-watch.c: Include "config.h". Include <stdio.h>. * hw-device.c: Include <string.h>. * hw-events.c: Include <string.h>. * hw-handles.c: Include <stdlib.h>. * sim-fpu.c: Include <stdlib.h>. --- sim/common/hw-device.c | 4 ++++ sim/common/hw-events.c | 3 +++ sim/common/hw-handles.c | 3 +++ sim/common/sim-fpu.c | 3 +++ sim/common/sim-options.c | 2 ++ sim/common/sim-watch.c | 2 ++ 6 files changed, 17 insertions(+)
Comments
* Stafford Horne <shorne@gmail.com> [2019-03-17 06:40:18 +0900]: > During building of several cgen simulator's I notices the below > warnings. Adding includes fixes these. > > Including config.h allows stdio.h to properly configure itself to expose > asprintf(). > > The other warnings for abort, free, memset, strlen are trivial. > > Warnings: > > ../../../binutils-gdb/sim/or1k/../common/sim-watch.c: In function ‘sim_watchpoint_install’: > ../../../binutils-gdb/sim/or1k/../common/sim-watch.c:415:10: warning: implicit declaration of function ‘asprintf’; did you mean ‘vasprintf’? [-Wimplicit-function-declaration] > if (asprintf (&name, "watch-%s-%s", > ^~~~~~~~ > vasprintf > > ../../../binutils-gdb/sim/lm32/../common/hw-device.c: In function ‘hw_strdup’: > ../../../binutils-gdb/sim/lm32/../common/hw-device.c:59:34: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration] > char *dup = hw_zalloc (me, strlen (str) + 1); > ^~~~~~ > > ../../../binutils-gdb/sim/lm32/../common/hw-events.c: In function ‘hw_event_queue_schedule’: > ../../../binutils-gdb/sim/lm32/../common/hw-events.c:92:3: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration] > memset (&dummy, 0, sizeof dummy); > ^~~~~~ > > ../../../binutils-gdb/sim/lm32/../common/hw-handles.c: In function ‘hw_handle_remove_ihandle’: > ../../../binutils-gdb/sim/lm32/../common/hw-handles.c:211:4: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration] > free (delete); > ^~~~ > > ../../../binutils-gdb/sim/lm32/../common/sim-fpu.c: In function ‘pack_fpu’: > ../../../binutils-gdb/sim/lm32/../common/sim-fpu.c:292:7: warning: implicit declaration of function ‘abort’ [-Wimplicit-function-declaration] > abort (); > ^~~~~ > > sim/common/ChangeLog: > > * sim-options.c: Include "config.h". > Include <stdio.h>. > * sim-watch.c: Include "config.h". > Include <stdio.h>. > * hw-device.c: Include <string.h>. > * hw-events.c: Include <string.h>. > * hw-handles.c: Include <stdlib.h>. > * sim-fpu.c: Include <stdlib.h>. This all looks good. Thanks, Andrew > --- > sim/common/hw-device.c | 4 ++++ > sim/common/hw-events.c | 3 +++ > sim/common/hw-handles.c | 3 +++ > sim/common/sim-fpu.c | 3 +++ > sim/common/sim-options.c | 2 ++ > sim/common/sim-watch.c | 2 ++ > 6 files changed, 17 insertions(+) > > diff --git a/sim/common/hw-device.c b/sim/common/hw-device.c > index ee1bfad893..458ee22caa 100644 > --- a/sim/common/hw-device.c > +++ b/sim/common/hw-device.c > @@ -27,6 +27,10 @@ > #include <stdlib.h> > #endif > > +#if HAVE_STRING_H > +#include <string.h> > +#endif > + > /* Address methods */ > > const hw_unit * > diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c > index e6523365bd..f78be2aa46 100644 > --- a/sim/common/hw-events.c > +++ b/sim/common/hw-events.c > @@ -23,6 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ > > #include "sim-events.h" > > +#if HAVE_STRING_H > +#include <string.h> > +#endif > > /* The hw-events object is implemented using sim-events */ > > diff --git a/sim/common/hw-handles.c b/sim/common/hw-handles.c > index 2848b9bcb5..d05656235d 100644 > --- a/sim/common/hw-handles.c > +++ b/sim/common/hw-handles.c > @@ -23,6 +23,9 @@ > #include "hw-main.h" > #include "hw-base.h" > > +#if HAVE_STDLIB_H > +#include <stdlib.h> > +#endif > > struct hw_handle_mapping > { > diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c > index 81cdbf5061..74f5fd488c 100644 > --- a/sim/common/sim-fpu.c > +++ b/sim/common/sim-fpu.c > @@ -41,6 +41,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ > #include "sim-io.h" > #include "sim-assert.h" > > +#ifdef HAVE_STDLIB_H > +#include <stdlib.h> > +#endif > > /* Debugging support. > If digits is -1, then print all digits. */ > diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c > index 69aebfe3d0..dc4a71203a 100644 > --- a/sim/common/sim-options.c > +++ b/sim/common/sim-options.c > @@ -17,6 +17,7 @@ GNU General Public License for more details. > You should have received a copy of the GNU General Public License > along with this program. If not, see <http://www.gnu.org/licenses/>. */ > > +#include "config.h" > #include "sim-main.h" > #ifdef HAVE_STRING_H > #include <string.h> > @@ -29,6 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ > #include <stdlib.h> > #endif > #include <ctype.h> > +#include <stdio.h> > #include "libiberty.h" > #include "sim-options.h" > #include "sim-io.h" > diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c > index 6c357f8267..174336b377 100644 > --- a/sim/common/sim-watch.c > +++ b/sim/common/sim-watch.c > @@ -17,12 +17,14 @@ GNU General Public License for more details. > You should have received a copy of the GNU General Public License > along with this program. If not, see <http://www.gnu.org/licenses/>. */ > > +#include "config.h" > #include "sim-main.h" > #include "sim-options.h" > > #include "sim-assert.h" > > #include <ctype.h> > +#include <stdio.h> > > #ifdef HAVE_STRING_H > #include <string.h> > -- > 2.19.1 >
> On 21 Mar 2019, at 22:14, Andrew Burgess <andrew.burgess@embecosm.com> wrote: > > * Stafford Horne <shorne@gmail.com> [2019-03-17 06:40:18 +0900]: > >> During building of several cgen simulator's I notices the below >> warnings. Adding includes fixes these. >> >> Including config.h allows stdio.h to properly configure itself to expose >> asprintf(). Stafford, it looks like this breaks AArch64 on both Ubuntu 16.04 and 18.04: libsim.a(interp.o): In function `sim_open': /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/interp.c:328: undefined reference to `SIM_ASSERT' libsim.a(cpustate.o): In function `aarch64_get_vec_u64': /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:438: undefined reference to `ARRAY_SIZE' libsim.a(cpustate.o): In function `aarch64_get_vec_u32': /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:444: undefined reference to `ARRAY_SIZE' libsim.a(cpustate.o): In function `aarch64_get_vec_u16': /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:450: undefined reference to `ARRAY_SIZE' libsim.a(cpustate.o): In function `aarch64_get_vec_u8': /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:456: undefined reference to `ARRAY_SIZE' libsim.a(cpustate.o): In function `aarch64_get_vec_s64': /work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/Makefile:271: recipe for target 'run' failed make[3]: Leaving directory '/work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64' Makefile:129: recipe for target 'all' failed make[2]: Leaving directory '/work/alahay01/gdb-HEAD/build-aarch64/sim' Makefile:8878: recipe for target 'all-sim' failed binutils-gdb/sim/aarch64/cpustate.c:462: undefined reference to `ARRAY_SIZE' libsim.a(cpustate.o):/work/alahay01/gdb-HEAD/build-aarch64/sim/aarch64/../../../src/binutils-gdb/sim/aarch64/cpustate.c:468: more undefined references to `ARRAY_SIZE' follow collect2: error: ld returned 1 exit status I suspect the AArch64 buildbot will be failing once it catches up https://gdb-build.sergiodj.net/waterfall?tag=aarch64 Alan. >> >> The other warnings for abort, free, memset, strlen are trivial. >> >> Warnings: >> >> ../../../binutils-gdb/sim/or1k/../common/sim-watch.c: In function ‘sim_watchpoint_install’: >> ../../../binutils-gdb/sim/or1k/../common/sim-watch.c:415:10: warning: implicit declaration of function ‘asprintf’; did you mean ‘vasprintf’? [-Wimplicit-function-declaration] >> if (asprintf (&name, "watch-%s-%s", >> ^~~~~~~~ >> vasprintf >> >> ../../../binutils-gdb/sim/lm32/../common/hw-device.c: In function ‘hw_strdup’: >> ../../../binutils-gdb/sim/lm32/../common/hw-device.c:59:34: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration] >> char *dup = hw_zalloc (me, strlen (str) + 1); >> ^~~~~~ >> >> ../../../binutils-gdb/sim/lm32/../common/hw-events.c: In function ‘hw_event_queue_schedule’: >> ../../../binutils-gdb/sim/lm32/../common/hw-events.c:92:3: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration] >> memset (&dummy, 0, sizeof dummy); >> ^~~~~~ >> >> ../../../binutils-gdb/sim/lm32/../common/hw-handles.c: In function ‘hw_handle_remove_ihandle’: >> ../../../binutils-gdb/sim/lm32/../common/hw-handles.c:211:4: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration] >> free (delete); >> ^~~~ >> >> ../../../binutils-gdb/sim/lm32/../common/sim-fpu.c: In function ‘pack_fpu’: >> ../../../binutils-gdb/sim/lm32/../common/sim-fpu.c:292:7: warning: implicit declaration of function ‘abort’ [-Wimplicit-function-declaration] >> abort (); >> ^~~~~ >> >> sim/common/ChangeLog: >> >> * sim-options.c: Include "config.h". >> Include <stdio.h>. >> * sim-watch.c: Include "config.h". >> Include <stdio.h>. >> * hw-device.c: Include <string.h>. >> * hw-events.c: Include <string.h>. >> * hw-handles.c: Include <stdlib.h>. >> * sim-fpu.c: Include <stdlib.h>. > > This all looks good. > > Thanks, > Andrew > > >> --- >> sim/common/hw-device.c | 4 ++++ >> sim/common/hw-events.c | 3 +++ >> sim/common/hw-handles.c | 3 +++ >> sim/common/sim-fpu.c | 3 +++ >> sim/common/sim-options.c | 2 ++ >> sim/common/sim-watch.c | 2 ++ >> 6 files changed, 17 insertions(+) >> >> diff --git a/sim/common/hw-device.c b/sim/common/hw-device.c >> index ee1bfad893..458ee22caa 100644 >> --- a/sim/common/hw-device.c >> +++ b/sim/common/hw-device.c >> @@ -27,6 +27,10 @@ >> #include <stdlib.h> >> #endif >> >> +#if HAVE_STRING_H >> +#include <string.h> >> +#endif >> + >> /* Address methods */ >> >> const hw_unit * >> diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c >> index e6523365bd..f78be2aa46 100644 >> --- a/sim/common/hw-events.c >> +++ b/sim/common/hw-events.c >> @@ -23,6 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ >> >> #include "sim-events.h" >> >> +#if HAVE_STRING_H >> +#include <string.h> >> +#endif >> >> /* The hw-events object is implemented using sim-events */ >> >> diff --git a/sim/common/hw-handles.c b/sim/common/hw-handles.c >> index 2848b9bcb5..d05656235d 100644 >> --- a/sim/common/hw-handles.c >> +++ b/sim/common/hw-handles.c >> @@ -23,6 +23,9 @@ >> #include "hw-main.h" >> #include "hw-base.h" >> >> +#if HAVE_STDLIB_H >> +#include <stdlib.h> >> +#endif >> >> struct hw_handle_mapping >> { >> diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c >> index 81cdbf5061..74f5fd488c 100644 >> --- a/sim/common/sim-fpu.c >> +++ b/sim/common/sim-fpu.c >> @@ -41,6 +41,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ >> #include "sim-io.h" >> #include "sim-assert.h" >> >> +#ifdef HAVE_STDLIB_H >> +#include <stdlib.h> >> +#endif >> >> /* Debugging support. >> If digits is -1, then print all digits. */ >> diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c >> index 69aebfe3d0..dc4a71203a 100644 >> --- a/sim/common/sim-options.c >> +++ b/sim/common/sim-options.c >> @@ -17,6 +17,7 @@ GNU General Public License for more details. >> You should have received a copy of the GNU General Public License >> along with this program. If not, see <http://www.gnu.org/licenses/>. */ >> >> +#include "config.h" >> #include "sim-main.h" >> #ifdef HAVE_STRING_H >> #include <string.h> >> @@ -29,6 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ >> #include <stdlib.h> >> #endif >> #include <ctype.h> >> +#include <stdio.h> >> #include "libiberty.h" >> #include "sim-options.h" >> #include "sim-io.h" >> diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c >> index 6c357f8267..174336b377 100644 >> --- a/sim/common/sim-watch.c >> +++ b/sim/common/sim-watch.c >> @@ -17,12 +17,14 @@ GNU General Public License for more details. >> You should have received a copy of the GNU General Public License >> along with this program. If not, see <http://www.gnu.org/licenses/>. */ >> >> +#include "config.h" >> #include "sim-main.h" >> #include "sim-options.h" >> >> #include "sim-assert.h" >> >> #include <ctype.h> >> +#include <stdio.h> >> >> #ifdef HAVE_STRING_H >> #include <string.h> >> -- >> 2.19.1 >>
diff --git a/sim/common/hw-device.c b/sim/common/hw-device.c index ee1bfad893..458ee22caa 100644 --- a/sim/common/hw-device.c +++ b/sim/common/hw-device.c @@ -27,6 +27,10 @@ #include <stdlib.h> #endif +#if HAVE_STRING_H +#include <string.h> +#endif + /* Address methods */ const hw_unit * diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c index e6523365bd..f78be2aa46 100644 --- a/sim/common/hw-events.c +++ b/sim/common/hw-events.c @@ -23,6 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-events.h" +#if HAVE_STRING_H +#include <string.h> +#endif /* The hw-events object is implemented using sim-events */ diff --git a/sim/common/hw-handles.c b/sim/common/hw-handles.c index 2848b9bcb5..d05656235d 100644 --- a/sim/common/hw-handles.c +++ b/sim/common/hw-handles.c @@ -23,6 +23,9 @@ #include "hw-main.h" #include "hw-base.h" +#if HAVE_STDLIB_H +#include <stdlib.h> +#endif struct hw_handle_mapping { diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c index 81cdbf5061..74f5fd488c 100644 --- a/sim/common/sim-fpu.c +++ b/sim/common/sim-fpu.c @@ -41,6 +41,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-io.h" #include "sim-assert.h" +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif /* Debugging support. If digits is -1, then print all digits. */ diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index 69aebfe3d0..dc4a71203a 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -17,6 +17,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "config.h" #include "sim-main.h" #ifdef HAVE_STRING_H #include <string.h> @@ -29,6 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <stdlib.h> #endif #include <ctype.h> +#include <stdio.h> #include "libiberty.h" #include "sim-options.h" #include "sim-io.h" diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c index 6c357f8267..174336b377 100644 --- a/sim/common/sim-watch.c +++ b/sim/common/sim-watch.c @@ -17,12 +17,14 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "config.h" #include "sim-main.h" #include "sim-options.h" #include "sim-assert.h" #include <ctype.h> +#include <stdio.h> #ifdef HAVE_STRING_H #include <string.h>