diff options
author | Alan Modra <amodra@gmail.com> | 2023-01-12 16:46:23 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-01-12 17:20:21 +1030 |
commit | 4981a31d523de41713fc40aa8101b4d73d44df57 (patch) | |
tree | 17ff496b3e34113f137fe2b829cdba06a79ed2bc /gas | |
parent | 2070fc67bad14bd12c722a7a6baffcafd55e862a (diff) | |
download | gdb-4981a31d523de41713fc40aa8101b4d73d44df57.zip gdb-4981a31d523de41713fc40aa8101b4d73d44df57.tar.gz gdb-4981a31d523de41713fc40aa8101b4d73d44df57.tar.bz2 |
Use __func__ rather than __FUNCTION__
We already use C99's __func__ in places, use it more generally. This
patch doesn't change uses in the testsuite. I've also left one in
gold.h that is protected by GCC_VERSION < 4003. If any of the
remaining uses bothers anyone I invite patches.
bfd/
* bfd-in.h: Replace __FUNCTION__ with __func__.
* elf32-bfin.c: Likewise.
* elfnn-aarch64.c: Likewise.
* elfxx-sparc.c: Likewise.
* bfd-in2.h: Regenerate.
gas/
* config/tc-cris.c: Replace __FUNCTION__ with __func__.
* config/tc-m68hc11.c: Likewise.
* config/tc-msp430.c: Likewise.
gold/
* dwp.h: Replace __FUNCTION__ with __func__.
* gold.h: Likewise, except for use inside GCC_VERSION < 4003.
ld/
* emultempl/pe.em: Replace __FUNCTION__ with __func__.
* emultempl/pep.em: Likewise.
* pe-dll.c: Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/config/tc-cris.c | 12 | ||||
-rw-r--r-- | gas/config/tc-m68hc11.c | 6 | ||||
-rw-r--r-- | gas/config/tc-msp430.c | 10 |
3 files changed, 14 insertions, 14 deletions
diff --git a/gas/config/tc-cris.c b/gas/config/tc-cris.c index 3538051..b9631bb 100644 --- a/gas/config/tc-cris.c +++ b/gas/config/tc-cris.c @@ -548,11 +548,11 @@ cris_relax_frag (segT seg ATTRIBUTE_UNUSED, fragS *fragP, if (fragP->fr_symbol == NULL || S_GET_SEGMENT (fragP->fr_symbol) != absolute_section) as_fatal (_("internal inconsistency problem in %s: fr_symbol %lx"), - __FUNCTION__, (long) fragP->fr_symbol); + __func__, (long) fragP->fr_symbol); symbolP = fragP->fr_symbol; if (symbol_resolved_p (symbolP)) as_fatal (_("internal inconsistency problem in %s: resolved symbol"), - __FUNCTION__); + __func__); aim = S_GET_VALUE (symbolP); break; @@ -562,7 +562,7 @@ cris_relax_frag (segT seg ATTRIBUTE_UNUSED, fragS *fragP, default: as_fatal (_("internal inconsistency problem in %s: fr_subtype %d"), - __FUNCTION__, fragP->fr_subtype); + __func__, fragP->fr_subtype); } /* The rest is stolen from relax_frag. There's no obvious way to @@ -962,7 +962,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT sec ATTRIBUTE_UNUSED, case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_BYTE): if (symbolP == NULL) as_fatal (_("internal inconsistency in %s: bdapq no symbol"), - __FUNCTION__); + __func__); opcodep[0] = S_GET_VALUE (symbolP); var_part_size = 0; break; @@ -975,7 +975,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT sec ATTRIBUTE_UNUSED, opcodep[1] |= BDAP_INCR_HIGH; if (symbolP == NULL) as_fatal (_("internal inconsistency in %s: bdap.w with no symbol"), - __FUNCTION__); + __func__); md_number_to_chars (var_partp, S_GET_VALUE (symbolP), 2); var_part_size = 2; break; @@ -4237,7 +4237,7 @@ s_cris_dtpoff (int bytes) if (bytes != 4) as_fatal (_("internal inconsistency problem: %s called for %d bytes"), - __FUNCTION__, bytes); + __func__, bytes); expression (&ex); diff --git a/gas/config/tc-m68hc11.c b/gas/config/tc-m68hc11.c index f5043d7..7438e0d 100644 --- a/gas/config/tc-m68hc11.c +++ b/gas/config/tc-m68hc11.c @@ -3892,17 +3892,17 @@ m68hc11_relax_frag (segT seg ATTRIBUTE_UNUSED, fragS *fragP, if (fragP->fr_symbol == NULL || S_GET_SEGMENT (fragP->fr_symbol) != absolute_section) as_fatal (_("internal inconsistency problem in %s: fr_symbol %lx"), - __FUNCTION__, (long) fragP->fr_symbol); + __func__, (long) fragP->fr_symbol); symbolP = fragP->fr_symbol; if (symbol_resolved_p (symbolP)) as_fatal (_("internal inconsistency problem in %s: resolved symbol"), - __FUNCTION__); + __func__); aim = S_GET_VALUE (symbolP); break; default: as_fatal (_("internal inconsistency problem in %s: fr_subtype %d"), - __FUNCTION__, fragP->fr_subtype); + __func__, fragP->fr_subtype); } /* The rest is stolen from relax_frag. There's no obvious way to diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c index 3af15c8..d6fedd8 100644 --- a/gas/config/tc-msp430.c +++ b/gas/config/tc-msp430.c @@ -4868,7 +4868,7 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, if (!cc || !cc->name) as_fatal (_("internal inconsistency problem in %s: insn %04lx"), - __FUNCTION__, (long) insn); + __func__, (long) insn); where = fragP->fr_literal + fragP->fr_fix; bfd_putl16 (cc->lop0, where); bfd_putl16 (cc->lop1, where + 2); @@ -4910,7 +4910,7 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, } if (!hc || !hc->name) as_fatal (_("internal inconsistency problem in %s: ext. insn %04lx"), - __FUNCTION__, (long) insn); + __func__, (long) insn); rela = BFD_RELOC_MSP430_10_PCREL; /* Apply a fix for a first label if necessary. another fix will be applied to the next word of insn anyway. */ @@ -4942,7 +4942,7 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, } if (!hc || !hc->name) as_fatal (_("internal inconsistency problem in %s: ext. insn %04lx"), - __FUNCTION__, (long) insn); + __func__, (long) insn); rela = BFD_RELOC_MSP430_RL_PCREL; where = fragP->fr_literal + fragP->fr_fix; bfd_putl16 (hc->lop0, where); @@ -4954,7 +4954,7 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, default: as_fatal (_("internal inconsistency problem in %s: %lx"), - __FUNCTION__, (long) fragP->fr_subtype); + __func__, (long) fragP->fr_subtype); break; } @@ -4991,7 +4991,7 @@ msp430_relax_frag (segT seg ATTRIBUTE_UNUSED, fragS * fragP, symbolP = fragP->fr_symbol; if (symbol_resolved_p (symbolP)) as_fatal (_("internal inconsistency problem in %s: resolved symbol"), - __FUNCTION__); + __func__); /* We know the offset. calculate a distance. */ aim = S_GET_VALUE (symbolP) - fragP->fr_address - fragP->fr_fix; } |