Re: [PATCH] Add header guard to several header files.

2014-09-18 Thread Kito Cheng
Hi Joseph:

Here is updated patch and ChangeLog,

However I don't have commit write yet, can you help me to commit it? thanks

btw, I has already signed FSF agreement:)


2014-09-19  Kito Cheng  k...@0xlab.org

except.h: Fix header guard.
addresses.h: Add missing header guard.
cfghooks.h: Likewise.
collect-utils.h: Likewise.
collect2-aix.h: Likewise.
conditions.h: Likewise.
cselib.h: Likewise.
dwarf2asm.h: Likewise.
graphds.h: Likewise.
graphite-scop-detection.h: Likewise.
gsyms.h: Likewise.
hw-doloop.h: Likewise.
incpath.h: Likewise.
ipa-inline.h: Likewise.
ipa-ref.h: Likewise.
ira-int.h: Likewise.
ira.h: Likewise.
lra-int.h: Likewise.
lra.h: Likewise.
lto-section-names.h: Likewise.
read-md.h: Likewise.
reload.h: Likewise.
rtl-error.h: Likewise.
sdbout.h: Likewise.
targhooks.h: Likewise.
tree-affine.h: Likewise.
xcoff.h: Likewise.
xcoffout.h: Likewise.

 OK except for the changes to target-def.h and target-hooks-macros.h.
 (Those aren't exactly normal headers that could reasonably be included
 more than once in a source file; they have dependencies on where they get
 included and what's defined before/after inclusion.  So while I suspect
 the include guards would not cause any problems in those headers, it's not
 obvious they're desirable either.)
From 8c7e08c00526265f21830f72c7b266fd48ddea17 Mon Sep 17 00:00:00 2001
From: Kito Cheng kito.ch...@gmail.com
Date: Fri, 22 Aug 2014 17:34:49 +0800
Subject: [PATCH] Add header guard to several header files.

2014-09-19  Kito Cheng  k...@0xlab.org

	except.h: Fix header guard.
	addresses.h: Add missing header guard.
	cfghooks.h: Likewise.
	collect-utils.h: Likewise.
	collect2-aix.h: Likewise.
	conditions.h: Likewise.
	cselib.h: Likewise.
	dwarf2asm.h: Likewise.
	graphds.h: Likewise.
	graphite-scop-detection.h: Likewise.
	gsyms.h: Likewise.
	hw-doloop.h: Likewise.
	incpath.h: Likewise.
	ipa-inline.h: Likewise.
	ipa-ref.h: Likewise.
	ira-int.h: Likewise.
	ira.h: Likewise.
	lra-int.h: Likewise.
	lra.h: Likewise.
	lto-section-names.h: Likewise.
	read-md.h: Likewise.
	reload.h: Likewise.
	rtl-error.h: Likewise.
	sdbout.h: Likewise.
	targhooks.h: Likewise.
	tree-affine.h: Likewise.
	xcoff.h: Likewise.
	xcoffout.h: Likewise.
---
 gcc/addresses.h   | 5 +
 gcc/cfghooks.h| 4 
 gcc/collect-utils.h   | 5 +
 gcc/collect2-aix.h| 4 
 gcc/conditions.h  | 5 +
 gcc/cselib.h  | 5 +
 gcc/dwarf2asm.h   | 4 
 gcc/except.h  | 5 +++--
 gcc/graphds.h | 5 +
 gcc/graphite-scop-detection.h | 4 
 gcc/gsyms.h   | 4 
 gcc/hw-doloop.h   | 5 +
 gcc/incpath.h | 5 +
 gcc/ipa-inline.h  | 5 +
 gcc/ipa-ref.h | 5 +
 gcc/ira-int.h | 5 +
 gcc/ira.h | 5 +
 gcc/lra-int.h | 5 +
 gcc/lra.h | 5 +
 gcc/lto-section-names.h   | 5 +
 gcc/read-md.h | 5 +
 gcc/reload.h  | 4 
 gcc/rtl-error.h   | 5 +
 gcc/sdbout.h  | 5 +
 gcc/targhooks.h   | 5 +
 gcc/tree-affine.h | 5 +
 gcc/xcoff.h   | 5 +
 gcc/xcoffout.h| 4 
 28 files changed, 131 insertions(+), 2 deletions(-)

diff --git a/gcc/addresses.h b/gcc/addresses.h
index e323b58..3f0089a 100644
--- a/gcc/addresses.h
+++ b/gcc/addresses.h
@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3.  If not see
MODE_BASE_REG_REG_CLASS, MODE_BASE_REG_CLASS and BASE_REG_CLASS.
Arguments as for the MODE_CODE_BASE_REG_CLASS macro.  */
 
+#ifndef GCC_ADDRESSES_H
+#define GCC_ADDRESSES_H
+
 static inline enum reg_class
 base_reg_class (enum machine_mode mode ATTRIBUTE_UNUSED,
 		addr_space_t as ATTRIBUTE_UNUSED,
@@ -82,3 +85,5 @@ regno_ok_for_base_p (unsigned regno, enum machine_mode mode, addr_space_t as,
 
   return ok_for_base_p_1 (regno, mode, as, outer_code, index_code);
 }
+
+#endif /* GCC_ADDRESSES_H */
diff --git a/gcc/cfghooks.h b/gcc/cfghooks.h
index 8ff808c..1b8587a 100644
--- a/gcc/cfghooks.h
+++ b/gcc/cfghooks.h
@@ -18,6 +18,9 @@ You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING3.  If not see
 http://www.gnu.org/licenses/.  */
 
+#ifndef GCC_CFGHOOKS_H
+#define GCC_CFGHOOKS_H
+
 /* Only basic-block.h includes this.  */
 
 struct cfg_hooks
@@ -221,3 +224,4 @@ extern void gimple_register_cfg_hooks (void);
 extern struct cfg_hooks get_cfg_hooks (void);
 extern void set_cfg_hooks (struct cfg_hooks);
 
+#endif /* GCC_CFGHOOKS_H */
diff --git a/gcc/collect-utils.h b/gcc/collect-utils.h
index 2989c6b..ba1985e 100644
--- a/gcc/collect-utils.h
+++ b/gcc/collect-utils.h
@@ -17,6 +17,9 @@ You should have received a copy

Re: [PATCH] Add header guard to several header files.

2014-09-18 Thread Joseph S. Myers
On Fri, 19 Sep 2014, Kito Cheng wrote:

 Hi Joseph:
 
 Here is updated patch and ChangeLog,
 
 However I don't have commit write yet, can you help me to commit it? thanks

Committed.

-- 
Joseph S. Myers
jos...@codesourcery.com


Re: [PATCH] Add header guard to several header files.

2014-09-17 Thread Kito Cheng
Updated patch

On Wed, Sep 17, 2014 at 9:17 PM, Kito Cheng kito.ch...@gmail.com wrote:
 Updated patch

 On Mon, Sep 8, 2014 at 9:46 PM, Kito Cheng kito.ch...@gmail.com wrote:

 ping!

 On Tue, Sep 2, 2014 at 12:37 AM, Kito Cheng kito.ch...@gmail.com wrote:
  Hi Joseph:
 
  Thanks for your review, I've reverted the part of gsyslimits.h,
  here is updated patch and ChangeLog :)
 
  bootstrap ok for x86_64
 
  2014-09-01  Kito Cheng  k...@0xlab.org
 
  except.h: Fix header guard.
  addresses.h: Add missing header guard.
  cfghooks.h: Likewise.
  collect-utils.h: Likewise.
  collect2-aix.h: Likewise.
  conditions.h: Likewise.
  cselib.h: Likewise.
  dwarf2asm.h: Likewise.
  graphds.h: Likewise.
  graphite-scop-detection.h: Likewise.
  gsyms.h: Likewise.
  hw-doloop.h: Likewise.
  incpath.h: Likewise.
  ipa-inline.h: Likewise.
  ipa-ref.h: Likewise.
  ira-int.h: Likewise.
  ira.h: Likewise.
  lra-int.h: Likewise.
  lra.h: Likewise.
  lto-section-names.h: Likewise.
  read-md.h: Likewise.
  reload.h: Likewise.
  rtl-error.h: Likewise.
  sdbout.h: Likewise.
  target-def.h: Likewise.
  target-hooks-macros.h: Likewise.
  targhooks.h: Likewise.
  tree-affine.h: Likewise.
  xcoff.h: Likewise.
  xcoffout.h: Likewise.
 
  On Mon, Sep 1, 2014 at 11:56 PM, Joseph S. Myers
  jos...@codesourcery.com wrote:
  On Mon, 1 Sep 2014, Kito Cheng wrote:
 
  gsyslimits.h: Likewise.
 
  This is incorrect.  This is a very special header file, installed as
  part
  of the implementation of limits.h; it certainly can't use any
  user-namespace identifiers, and it's probably not safe for it to have
  header guards at all.
 
  --
  Joseph S. Myers
  jos...@codesourcery.com


From a4c4d11680a223c9b9b5ab565234f31a2c8e5cb3 Mon Sep 17 00:00:00 2001
From: Kito Cheng kito.ch...@gmail.com
Date: Fri, 22 Aug 2014 17:34:49 +0800
Subject: [PATCH] Add header guard to several header files.

2014-09-01  Kito Cheng  k...@0xlab.org

	except.h: Fix header guard.
	addresses.h: Add missing header guard.
	cfghooks.h: Likewise.
	collect-utils.h: Likewise.
	collect2-aix.h: Likewise.
	conditions.h: Likewise.
	cselib.h: Likewise.
	dwarf2asm.h: Likewise.
	graphds.h: Likewise.
	graphite-scop-detection.h: Likewise.
	gsyms.h: Likewise.
	hw-doloop.h: Likewise.
	incpath.h: Likewise.
	ipa-inline.h: Likewise.
	ipa-ref.h: Likewise.
	ira-int.h: Likewise.
	ira.h: Likewise.
	lra-int.h: Likewise.
	lra.h: Likewise.
	lto-section-names.h: Likewise.
	read-md.h: Likewise.
	reload.h: Likewise.
	rtl-error.h: Likewise.
	sdbout.h: Likewise.
	target-def.h: Likewise.
	target-hooks-macros.h: Likewise.
	targhooks.h: Likewise.
	tree-affine.h: Likewise.
	xcoff.h: Likewise.
	xcoffout.h: Likewise.
---
 gcc/addresses.h   | 5 +
 gcc/cfghooks.h| 4 
 gcc/collect-utils.h   | 5 +
 gcc/collect2-aix.h| 4 
 gcc/conditions.h  | 5 +
 gcc/cselib.h  | 5 +
 gcc/dwarf2asm.h   | 4 
 gcc/except.h  | 5 +++--
 gcc/graphds.h | 5 +
 gcc/graphite-scop-detection.h | 4 
 gcc/gsyms.h   | 4 
 gcc/hw-doloop.h   | 5 +
 gcc/incpath.h | 5 +
 gcc/ipa-inline.h  | 5 +
 gcc/ipa-ref.h | 5 +
 gcc/ira-int.h | 5 +
 gcc/ira.h | 5 +
 gcc/lra-int.h | 5 +
 gcc/lra.h | 5 +
 gcc/lto-section-names.h   | 5 +
 gcc/read-md.h | 5 +
 gcc/reload.h  | 4 
 gcc/rtl-error.h   | 5 +
 gcc/sdbout.h  | 5 +
 gcc/target-def.h  | 5 +
 gcc/target-hooks-macros.h | 5 +
 gcc/targhooks.h   | 5 +
 gcc/tree-affine.h | 5 +
 gcc/xcoff.h   | 5 +
 gcc/xcoffout.h| 4 
 30 files changed, 141 insertions(+), 2 deletions(-)

diff --git a/gcc/addresses.h b/gcc/addresses.h
index e323b58..3f0089a 100644
--- a/gcc/addresses.h
+++ b/gcc/addresses.h
@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3.  If not see
MODE_BASE_REG_REG_CLASS, MODE_BASE_REG_CLASS and BASE_REG_CLASS.
Arguments as for the MODE_CODE_BASE_REG_CLASS macro.  */
 
+#ifndef GCC_ADDRESSES_H
+#define GCC_ADDRESSES_H
+
 static inline enum reg_class
 base_reg_class (enum machine_mode mode ATTRIBUTE_UNUSED,
 		addr_space_t as ATTRIBUTE_UNUSED,
@@ -82,3 +85,5 @@ regno_ok_for_base_p (unsigned regno, enum machine_mode mode, addr_space_t as,
 
   return ok_for_base_p_1 (regno, mode, as, outer_code, index_code);
 }
+
+#endif /* GCC_ADDRESSES_H */
diff --git a/gcc/cfghooks.h b/gcc/cfghooks.h
index 8ff808c..1b8587a 100644
--- a/gcc/cfghooks.h
+++ b/gcc/cfghooks.h
@@ -18,6 +18,9 @@ You should have received a copy of the GNU General Public License
 along with GCC; see the file

Re: [PATCH] Add header guard to several header files.

2014-09-17 Thread Joseph S. Myers
On Wed, 17 Sep 2014, Kito Cheng wrote:

 Updated patch

OK except for the changes to target-def.h and target-hooks-macros.h.  
(Those aren't exactly normal headers that could reasonably be included 
more than once in a source file; they have dependencies on where they get 
included and what's defined before/after inclusion.  So while I suspect 
the include guards would not cause any problems in those headers, it's not 
obvious they're desirable either.)

-- 
Joseph S. Myers
jos...@codesourcery.com


Re: [PATCH] Add header guard to several header files.

2014-09-08 Thread Kito Cheng
ping!

On Tue, Sep 2, 2014 at 12:37 AM, Kito Cheng kito.ch...@gmail.com wrote:
 Hi Joseph:

 Thanks for your review, I've reverted the part of gsyslimits.h,
 here is updated patch and ChangeLog :)

 bootstrap ok for x86_64

 2014-09-01  Kito Cheng  k...@0xlab.org

 except.h: Fix header guard.
 addresses.h: Add missing header guard.
 cfghooks.h: Likewise.
 collect-utils.h: Likewise.
 collect2-aix.h: Likewise.
 conditions.h: Likewise.
 cselib.h: Likewise.
 dwarf2asm.h: Likewise.
 graphds.h: Likewise.
 graphite-scop-detection.h: Likewise.
 gsyms.h: Likewise.
 hw-doloop.h: Likewise.
 incpath.h: Likewise.
 ipa-inline.h: Likewise.
 ipa-ref.h: Likewise.
 ira-int.h: Likewise.
 ira.h: Likewise.
 lra-int.h: Likewise.
 lra.h: Likewise.
 lto-section-names.h: Likewise.
 read-md.h: Likewise.
 reload.h: Likewise.
 rtl-error.h: Likewise.
 sdbout.h: Likewise.
 target-def.h: Likewise.
 target-hooks-macros.h: Likewise.
 targhooks.h: Likewise.
 tree-affine.h: Likewise.
 xcoff.h: Likewise.
 xcoffout.h: Likewise.

 On Mon, Sep 1, 2014 at 11:56 PM, Joseph S. Myers
 jos...@codesourcery.com wrote:
 On Mon, 1 Sep 2014, Kito Cheng wrote:

 gsyslimits.h: Likewise.

 This is incorrect.  This is a very special header file, installed as part
 of the implementation of limits.h; it certainly can't use any
 user-namespace identifiers, and it's probably not safe for it to have
 header guards at all.

 --
 Joseph S. Myers
 jos...@codesourcery.com


Re: [PATCH] Add header guard to several header files.

2014-09-01 Thread Joseph S. Myers
On Mon, 1 Sep 2014, Kito Cheng wrote:

 gsyslimits.h: Likewise.

This is incorrect.  This is a very special header file, installed as part 
of the implementation of limits.h; it certainly can't use any 
user-namespace identifiers, and it's probably not safe for it to have 
header guards at all.

-- 
Joseph S. Myers
jos...@codesourcery.com


Re: [PATCH] Add header guard to several header files.

2014-09-01 Thread Kito Cheng
Hi Joseph:

Thanks for your review, I've reverted the part of gsyslimits.h,
here is updated patch and ChangeLog :)

bootstrap ok for x86_64

2014-09-01  Kito Cheng  k...@0xlab.org

except.h: Fix header guard.
addresses.h: Add missing header guard.
cfghooks.h: Likewise.
collect-utils.h: Likewise.
collect2-aix.h: Likewise.
conditions.h: Likewise.
cselib.h: Likewise.
dwarf2asm.h: Likewise.
graphds.h: Likewise.
graphite-scop-detection.h: Likewise.
gsyms.h: Likewise.
hw-doloop.h: Likewise.
incpath.h: Likewise.
ipa-inline.h: Likewise.
ipa-ref.h: Likewise.
ira-int.h: Likewise.
ira.h: Likewise.
lra-int.h: Likewise.
lra.h: Likewise.
lto-section-names.h: Likewise.
read-md.h: Likewise.
reload.h: Likewise.
rtl-error.h: Likewise.
sdbout.h: Likewise.
target-def.h: Likewise.
target-hooks-macros.h: Likewise.
targhooks.h: Likewise.
tree-affine.h: Likewise.
xcoff.h: Likewise.
xcoffout.h: Likewise.

On Mon, Sep 1, 2014 at 11:56 PM, Joseph S. Myers
jos...@codesourcery.com wrote:
 On Mon, 1 Sep 2014, Kito Cheng wrote:

 gsyslimits.h: Likewise.

 This is incorrect.  This is a very special header file, installed as part
 of the implementation of limits.h; it certainly can't use any
 user-namespace identifiers, and it's probably not safe for it to have
 header guards at all.

 --
 Joseph S. Myers
 jos...@codesourcery.com
From f27229940d587ebea672be43caf002a99854e51c Mon Sep 17 00:00:00 2001
From: Kito Cheng kito.ch...@gmail.com
Date: Fri, 22 Aug 2014 17:34:49 +0800
Subject: [PATCH] Add header guard to several header files.

2014-09-01  Kito Cheng  k...@0xlab.org

	except.h: Fix header guard.
	addresses.h: Add missing header guard.
	cfghooks.h: Likewise.
	collect-utils.h: Likewise.
	collect2-aix.h: Likewise.
	conditions.h: Likewise.
	cselib.h: Likewise.
	dwarf2asm.h: Likewise.
	graphds.h: Likewise.
	graphite-scop-detection.h: Likewise.
	gsyms.h: Likewise.
	hw-doloop.h: Likewise.
	incpath.h: Likewise.
	ipa-inline.h: Likewise.
	ipa-ref.h: Likewise.
	ira-int.h: Likewise.
	ira.h: Likewise.
	lra-int.h: Likewise.
	lra.h: Likewise.
	lto-section-names.h: Likewise.
	read-md.h: Likewise.
	reload.h: Likewise.
	rtl-error.h: Likewise.
	sdbout.h: Likewise.
	target-def.h: Likewise.
	target-hooks-macros.h: Likewise.
	targhooks.h: Likewise.
	tree-affine.h: Likewise.
	xcoff.h: Likewise.
	xcoffout.h: Likewise.
---
 gcc/addresses.h   | 5 +
 gcc/cfghooks.h| 4 
 gcc/collect-utils.h   | 5 +
 gcc/collect2-aix.h| 4 
 gcc/conditions.h  | 5 +
 gcc/cselib.h  | 5 +
 gcc/dwarf2asm.h   | 4 
 gcc/except.h  | 5 +++--
 gcc/graphds.h | 5 +
 gcc/graphite-scop-detection.h | 4 
 gcc/gsyms.h   | 4 
 gcc/hw-doloop.h   | 5 +
 gcc/incpath.h | 5 +
 gcc/ipa-inline.h  | 5 +
 gcc/ipa-ref.h | 5 +
 gcc/ira-int.h | 5 +
 gcc/ira.h | 5 +
 gcc/lra-int.h | 5 +
 gcc/lra.h | 5 +
 gcc/lto-section-names.h   | 5 +
 gcc/read-md.h | 5 +
 gcc/reload.h  | 4 
 gcc/rtl-error.h   | 5 +
 gcc/sdbout.h  | 5 +
 gcc/target-def.h  | 5 +
 gcc/target-hooks-macros.h | 5 +
 gcc/targhooks.h   | 5 +
 gcc/tree-affine.h | 5 +
 gcc/xcoff.h   | 5 +
 gcc/xcoffout.h| 4 
 30 files changed, 141 insertions(+), 2 deletions(-)

diff --git a/gcc/addresses.h b/gcc/addresses.h
index e323b58..3f0089a 100644
--- a/gcc/addresses.h
+++ b/gcc/addresses.h
@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3.  If not see
MODE_BASE_REG_REG_CLASS, MODE_BASE_REG_CLASS and BASE_REG_CLASS.
Arguments as for the MODE_CODE_BASE_REG_CLASS macro.  */
 
+#ifndef GCC_ADDRESSES_H
+#define GCC_ADDRESSES_H
+
 static inline enum reg_class
 base_reg_class (enum machine_mode mode ATTRIBUTE_UNUSED,
 		addr_space_t as ATTRIBUTE_UNUSED,
@@ -82,3 +85,5 @@ regno_ok_for_base_p (unsigned regno, enum machine_mode mode, addr_space_t as,
 
   return ok_for_base_p_1 (regno, mode, as, outer_code, index_code);
 }
+
+#endif /* GCC_ADDRESSES_H */
diff --git a/gcc/cfghooks.h b/gcc/cfghooks.h
index 8ff808c..1b8587a 100644
--- a/gcc/cfghooks.h
+++ b/gcc/cfghooks.h
@@ -18,6 +18,9 @@ You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING3.  If not see
 http://www.gnu.org/licenses/.  */
 
+#ifndef GCC_CFGHOOKS_H
+#define GCC_CFGHOOKS_H
+
 /* Only basic-block.h includes this.  */
 
 struct cfg_hooks
@@ -221,3 +224,4 @@ extern void gimple_register_cfg_hooks (void);
 extern struct cfg_hooks get_cfg_hooks (void);
 extern void set_cfg_hooks (struct cfg_hooks);
 
+#endif

[PATCH] Add header guard to several header files.

2014-08-31 Thread Kito Cheng
Hi all:

This patch is add  header guard to several header files :)
From 1647c5d3ee3a7e086f57863b2503d11c1a699f00 Mon Sep 17 00:00:00 2001
From: Kito Cheng kito.ch...@gmail.com
Date: Fri, 22 Aug 2014 17:34:49 +0800
Subject: [PATCH] Add header guard to several header files.

2014-09-01  Kito Cheng  k...@0xlab.org

	except.h: Fix header guard.
	addresses.h: Add missing header guard.
	cfghooks.h: Likewise.
	collect-utils.h: Likewise.
	collect2-aix.h: Likewise.
	conditions.h: Likewise.
	cselib.h: Likewise.
	dwarf2asm.h: Likewise.
	graphds.h: Likewise.
	graphite-scop-detection.h: Likewise.
	gsyms.h: Likewise.
	gsyslimits.h: Likewise.
	hw-doloop.h: Likewise.
	incpath.h: Likewise.
	ipa-inline.h: Likewise.
	ipa-ref.h: Likewise.
	ira-int.h: Likewise.
	ira.h: Likewise.
	lra-int.h: Likewise.
	lra.h: Likewise.
	lto-section-names.h: Likewise.
	read-md.h: Likewise.
	reload.h: Likewise.
	rtl-error.h: Likewise.
	sdbout.h: Likewise.
	target-def.h: Likewise.
	target-hooks-macros.h: Likewise.
	targhooks.h: Likewise.
	tree-affine.h: Likewise.
	xcoff.h: Likewise.
	xcoffout.h: Likewise.
---
 gcc/addresses.h   | 5 +
 gcc/cfghooks.h| 4 
 gcc/collect-utils.h   | 5 +
 gcc/collect2-aix.h| 4 
 gcc/conditions.h  | 5 +
 gcc/cselib.h  | 5 +
 gcc/dwarf2asm.h   | 4 
 gcc/except.h  | 5 +++--
 gcc/graphds.h | 5 +
 gcc/graphite-scop-detection.h | 4 
 gcc/gsyms.h   | 4 
 gcc/gsyslimits.h  | 5 +
 gcc/hw-doloop.h   | 5 +
 gcc/incpath.h | 5 +
 gcc/ipa-inline.h  | 5 +
 gcc/ipa-ref.h | 5 +
 gcc/ira-int.h | 5 +
 gcc/ira.h | 5 +
 gcc/lra-int.h | 5 +
 gcc/lra.h | 5 +
 gcc/lto-section-names.h   | 5 +
 gcc/read-md.h | 5 +
 gcc/reload.h  | 4 
 gcc/rtl-error.h   | 5 +
 gcc/sdbout.h  | 5 +
 gcc/target-def.h  | 5 +
 gcc/target-hooks-macros.h | 5 +
 gcc/targhooks.h   | 5 +
 gcc/tree-affine.h | 5 +
 gcc/xcoff.h   | 5 +
 gcc/xcoffout.h| 4 
 31 files changed, 146 insertions(+), 2 deletions(-)

diff --git a/gcc/addresses.h b/gcc/addresses.h
index e323b58..3f0089a 100644
--- a/gcc/addresses.h
+++ b/gcc/addresses.h
@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3.  If not see
MODE_BASE_REG_REG_CLASS, MODE_BASE_REG_CLASS and BASE_REG_CLASS.
Arguments as for the MODE_CODE_BASE_REG_CLASS macro.  */
 
+#ifndef GCC_ADDRESSES_H
+#define GCC_ADDRESSES_H
+
 static inline enum reg_class
 base_reg_class (enum machine_mode mode ATTRIBUTE_UNUSED,
 		addr_space_t as ATTRIBUTE_UNUSED,
@@ -82,3 +85,5 @@ regno_ok_for_base_p (unsigned regno, enum machine_mode mode, addr_space_t as,
 
   return ok_for_base_p_1 (regno, mode, as, outer_code, index_code);
 }
+
+#endif /* GCC_ADDRESSES_H */
diff --git a/gcc/cfghooks.h b/gcc/cfghooks.h
index 8ff808c..1b8587a 100644
--- a/gcc/cfghooks.h
+++ b/gcc/cfghooks.h
@@ -18,6 +18,9 @@ You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING3.  If not see
 http://www.gnu.org/licenses/.  */
 
+#ifndef GCC_CFGHOOKS_H
+#define GCC_CFGHOOKS_H
+
 /* Only basic-block.h includes this.  */
 
 struct cfg_hooks
@@ -221,3 +224,4 @@ extern void gimple_register_cfg_hooks (void);
 extern struct cfg_hooks get_cfg_hooks (void);
 extern void set_cfg_hooks (struct cfg_hooks);
 
+#endif /* GCC_CFGHOOKS_H */
diff --git a/gcc/collect-utils.h b/gcc/collect-utils.h
index 2989c6b..ba1985e 100644
--- a/gcc/collect-utils.h
+++ b/gcc/collect-utils.h
@@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING3.  If not see
 http://www.gnu.org/licenses/.  */
 
+#ifndef GCC_COLLECT_UTILS_H
+#define GCC_COLLECT_UTILS_H
+
 /* Provided in collect-utils.c.  */
 extern void notice (const char *, ...)
   __attribute__ ((format (printf, 1, 2)));
@@ -42,3 +45,5 @@ extern const char tool_name[];
 /* Called by utils_cleanup.  */
 extern void tool_cleanup (bool);
 extern void maybe_unlink (const char *);
+
+#endif /* GCC_COLLECT_UTILS_H */
diff --git a/gcc/collect2-aix.h b/gcc/collect2-aix.h
index 953b877..40f855e 100644
--- a/gcc/collect2-aix.h
+++ b/gcc/collect2-aix.h
@@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING3.  If not see
 http://www.gnu.org/licenses/.  */
 
+#ifndef GCC_COLLECT2_AIX_H
+#define GCC_COLLECT2_AIX_H
 /* collect2-aix.c requires mmap support.  It should otherwise be
fairly portable.  */
 #if defined(CROSS_DIRECTORY_STRUCTURE) \
@@ -300,3 +302,5 @@ extern int ldtbread (LDFILE *, long, SYMENT *);
 extern int ldclose (LDFILE *);
 
 #endif
+
+#endif

Re: [PATCH] Add header guard to several header files.

2014-08-31 Thread Kito Cheng
Oops, ChangeLog here:

ChangeLog
2014-09-01  Kito Cheng  k...@0xlab.org

except.h: Fix header guard.
addresses.h: Add missing header guard.
cfghooks.h: Likewise.
collect-utils.h: Likewise.
collect2-aix.h: Likewise.
conditions.h: Likewise.
cselib.h: Likewise.
dwarf2asm.h: Likewise.
graphds.h: Likewise.
graphite-scop-detection.h: Likewise.
gsyms.h: Likewise.
gsyslimits.h: Likewise.
hw-doloop.h: Likewise.
incpath.h: Likewise.
ipa-inline.h: Likewise.
ipa-ref.h: Likewise.
ira-int.h: Likewise.
ira.h: Likewise.
lra-int.h: Likewise.
lra.h: Likewise.
lto-section-names.h: Likewise.
read-md.h: Likewise.
reload.h: Likewise.
rtl-error.h: Likewise.
sdbout.h: Likewise.
target-def.h: Likewise.
target-hooks-macros.h: Likewise.
targhooks.h: Likewise.
tree-affine.h: Likewise.
xcoff.h: Likewise.
xcoffout.h: Likewise.

On Mon, Sep 1, 2014 at 9:58 AM, Kito Cheng kito.ch...@gmail.com wrote:
 Hi all:

 This patch is add  header guard to several header files :)