Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH V3 1/2] multilib_header_wrapper.h: Use #pragma once
@ 2019-02-05  0:36 Khem Raj
  2019-02-05  0:36 ` [PATCH 2/2] mpfr: Upgrade to 4.0.2 release Khem Raj
  2019-02-06 20:41 ` [PATCH V3 1/2] multilib_header_wrapper.h: Use #pragma once Alex Kiernan
  0 siblings, 2 replies; 11+ messages in thread
From: Khem Raj @ 2019-02-05  0:36 UTC (permalink / raw)
  To: openembedded-core

Avoid infinite include loops, especially with bits/wordsize.h which is
now possible with the synthesized headers since we now also synthesize
bits/wordsize.h itelf for some arches e.g. arm/aarch64

In cases where extra preprocessing tools are used such as clang-tidy
e.g. and these tools are not passed the knowledge about architecture
then case comes where we enter into header include loop for
bits/wordsize.h, since this template does explicitly include
bits/wordsize.h

To fix this emits the pragma once at beginning of file, this is better
solution than include guards, and pragma once is practically supported
on all compilers except few e.g. cray c/c++ compiler

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
V2:
 - No Changes, just rebased
V3:
 - Do it using pragma once instead

 scripts/multilib_header_wrapper.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/multilib_header_wrapper.h b/scripts/multilib_header_wrapper.h
index 9660225fdd..4824790783 100644
--- a/scripts/multilib_header_wrapper.h
+++ b/scripts/multilib_header_wrapper.h
@@ -21,6 +21,7 @@
  * 
  */
 
+#pragma once
 
 #if defined (__bpf__)
 #define __MHWORDSIZE			64
-- 
2.20.1



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

end of thread, other threads:[~2019-02-07 10:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-05  0:36 [PATCH V3 1/2] multilib_header_wrapper.h: Use #pragma once Khem Raj
2019-02-05  0:36 ` [PATCH 2/2] mpfr: Upgrade to 4.0.2 release Khem Raj
2019-02-06  8:27   ` Richard Purdie
2019-02-06 20:41 ` [PATCH V3 1/2] multilib_header_wrapper.h: Use #pragma once Alex Kiernan
2019-02-06 20:50   ` Khem Raj
2019-02-06 20:58     ` Alex Kiernan
2019-02-06 21:23       ` Khem Raj
2019-02-06 21:49         ` Alex Kiernan
2019-02-07  2:16           ` Andre McCurdy
2019-02-07  6:27           ` Khem Raj
2019-02-07 10:44             ` Alex Kiernan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox