public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: or1k: fix include ordering with sim-main.h
@ 2021-01-09 19:11 Mike Frysinger
  2021-01-11 11:34 ` Andrew Burgess
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2021-01-09 19:11 UTC (permalink / raw)
  To: gdb-patches

Make sure config.h is included before C library headers otherwise the
later libiberty.h include gets confused about asprintf state leading
to warnings like:
common/sim-utils.c:330:9:
	warning: implicit declaration of function 'vasprintf';
	did you mean 'xvasprintf'? [-Wimplicit-function-declaration]
---
 sim/or1k/sim-main.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sim/or1k/sim-main.h b/sim/or1k/sim-main.h
index f91a351a2db1..cac1abb2b8fb 100644
--- a/sim/or1k/sim-main.h
+++ b/sim/or1k/sim-main.h
@@ -21,6 +21,8 @@
 
 #define WITH_SCACHE_PBB 1
 
+#include "config.h"
+
 #include "ansidecl.h"
 #include "or1k-desc.h"
 #include "sim-basics.h"
-- 
2.28.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] sim: or1k: fix include ordering with sim-main.h
  2021-01-09 19:11 [PATCH] sim: or1k: fix include ordering with sim-main.h Mike Frysinger
@ 2021-01-11 11:34 ` Andrew Burgess
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2021-01-11 11:34 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: gdb-patches

* Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> [2021-01-09 14:11:14 -0500]:

> Make sure config.h is included before C library headers otherwise the
> later libiberty.h include gets confused about asprintf state leading
> to warnings like:
> common/sim-utils.c:330:9:
> 	warning: implicit declaration of function 'vasprintf';
> 	did you mean 'xvasprintf'? [-Wimplicit-function-declaration]

Missing ChangeLog, otherwise, LGTM.

Thanks,
Andrew


> ---
>  sim/or1k/sim-main.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sim/or1k/sim-main.h b/sim/or1k/sim-main.h
> index f91a351a2db1..cac1abb2b8fb 100644
> --- a/sim/or1k/sim-main.h
> +++ b/sim/or1k/sim-main.h
> @@ -21,6 +21,8 @@
>  
>  #define WITH_SCACHE_PBB 1
>  
> +#include "config.h"
> +
>  #include "ansidecl.h"
>  #include "or1k-desc.h"
>  #include "sim-basics.h"
> -- 
> 2.28.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-11 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09 19:11 [PATCH] sim: or1k: fix include ordering with sim-main.h Mike Frysinger
2021-01-11 11:34 ` Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).