Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH V3 1/2] multilib_header_wrapper.h: Use #pragma once
Date: Mon,  4 Feb 2019 16:36:26 -0800	[thread overview]
Message-ID: <20190205003627.4454-1-raj.khem@gmail.com> (raw)

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



             reply	other threads:[~2019-02-05  0:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05  0:36 Khem Raj [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190205003627.4454-1-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox