]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: add missing header guard in tc-<arch>.h files
authorMatthieu Longo <matthieu.longo@arm.com>
Mon, 14 Jul 2025 14:18:02 +0000 (15:18 +0100)
committerMatthieu Longo <matthieu.longo@arm.com>
Mon, 28 Jul 2025 11:34:08 +0000 (12:34 +0100)
This patch adds missing header guards in some of the tc-<arch>.h,
and merely comments on the corresponding #endif for others. The
patch does not aim at being exhaustive, it only touched the files
relevant for [1].

[1]: https://inbox.sourceware.org/binutils/20250711112913.2453285-1-matthieu.longo@arm.com/

gas/config/tc-arc.h
gas/config/tc-arm.h
gas/config/tc-csky.h
gas/config/tc-msp430.h
gas/config/tc-ppc.h
gas/config/tc-s390.h
gas/config/tc-sparc.h
gas/config/tc-tic6x.h

index 145d955a4e217f1ab304fb7c331651299390cb7d..65470f04483e1098f50f1831253a5a9ffb13a029 100644 (file)
@@ -271,4 +271,4 @@ struct arc_relax_type
 extern void arc_md_end (void);
 #define md_end arc_md_end
 
-#endif
+#endif /* TC_ARC */
index aa5f1175df1a53ef0be68a3ba2c802617c994808..4148a6fb6347ff2df39f9864f1827ccae8e6cf43 100644 (file)
@@ -20,6 +20,7 @@
    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
+#ifndef TC_ARM
 #define TC_ARM 1
 
 #ifndef TARGET_BYTES_BIG_ENDIAN
@@ -377,3 +378,5 @@ extern bool arm_tc_equal_in_insn (int, char *);
 #define TC_LARGEST_EXPONENT_IS_NORMAL(PRECISION) \
        arm_is_largest_exponent_ok ((PRECISION))
 int arm_is_largest_exponent_ok (int precision);
+
+#endif /* TC_ARM */
index 7e323473e0fa5b17afa7dcadeea0782a8b9f7afb..d39108462a639bad3c1f559ec7c8ec76d6cae43d 100644 (file)
@@ -106,4 +106,4 @@ extern long csky_relax_frag (segT, fragS *, long);
 const char * elf32_csky_target_format (void);
 #endif
 
-#endif
+#endif /* TC_CSKY */
index 47da4aac407e3de0127df040d6219770eacd1b5e..fc39a596d131ec75bb52d4409a47b7e552d5bef9 100644 (file)
@@ -20,6 +20,7 @@
    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
+#ifndef TC_MSP430
 #define TC_MSP430
 /*   By convention, you should define this macro in the `.h' file.  For
      example, `tc-m68k.h' defines `TC_M68K'.  You might have to use this
@@ -172,3 +173,5 @@ extern bool msp430_allow_local_subtract (expressionS *, expressionS *, segT);
 #define TC_LINKRELAX_FIXUP(seg) ((seg->flags & SEC_CODE) || (seg->flags & SEC_DEBUGGING))
 
 #define DWARF2_ADDR_SIZE(bfd) 4
+
+#endif /* TC_MSP430 */
index 97e2f4ed19751582dc1d3a7c9ee98bd2ed158202..e568c423c0aa15b4c9cc50553ad69855b6e6d7a4 100644 (file)
@@ -19,6 +19,7 @@
    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
+#ifndef TC_PPC
 #define TC_PPC
 
 #include "opcode/ppc.h"
@@ -367,3 +368,5 @@ extern int ppc_dwarf2_line_min_insn_length;
 #define DWARF2_DEFAULT_RETURN_COLUMN    0x41
 #define DWARF2_CIE_DATA_ALIGNMENT       ppc_cie_data_alignment
 #define EH_FRAME_ALIGNMENT             2
+
+#endif /* TC_PPC */
index c92769e507b324fd2b4b4efc818062d6dc3a1239..0c621253a6b78736dd8728266182228f1d2f10d0 100644 (file)
@@ -19,6 +19,7 @@
    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
+#ifndef TC_S390
 #define TC_S390
 
 struct fix;
@@ -129,3 +130,5 @@ extern offsetT s390_sframe_cfa_ra_offset (void);
 /* The abi/arch identifier for SFrame.  */
 unsigned char s390_sframe_get_abi_arch (void);
 #define sframe_get_abi_arch s390_sframe_get_abi_arch
+
+#endif /* TC_S390 */
index d569fe7f2b648a88aa40db5d9851cd28db6e458b..cfb89e009bc23e672b7c3e94fdb92caa3bf218f2 100644 (file)
@@ -178,4 +178,4 @@ extern int sparc_cie_data_alignment;
    this, BFD_RELOC_32_PCREL will be emitted directly instead.  */
 #define CFI_DIFF_EXPR_OK 0
 
-#endif
+#endif /* TC_SPARC */
index 55f2b2c858056c7d17257ea484a44598dab4fef1..585933314654d586b063598a3b5088b123b36280 100644 (file)
@@ -18,7 +18,9 @@
    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
+#ifndef TC_TIC6X
 #define TC_TIC6X 1
+
 #define TARGET_BYTES_BIG_ENDIAN 0
 #define WORKING_DOT_WORD
 #define DOUBLEBAR_PARALLEL
@@ -225,3 +227,5 @@ struct fde_entry;
 void tic6x_cfi_endproc (struct fde_entry *fde);
 
 #define tc_cfi_section_name ".c6xabi.exidx"
+
+#endif /* TC_TIC6X */