aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/class.c
diff options
context:
space:
mode:
authorDavid Billinghurst <David.Billinghurst@riotinto.com>2002-02-11 22:53:09 +0000
committerDavid Billinghurst <billingd@gcc.gnu.org>2002-02-11 22:53:09 +0000
commit5667c33d018a6f97ce58985a46c6f4e6e545f034 (patch)
treee7be4a3b6d9c87db33d18b2ea834ac8d980beb7d /gcc/java/class.c
parenta02ac96696de10ffaf30cfdfac8a54b599368a2d (diff)
downloadgcc-5667c33d018a6f97ce58985a46c6f4e6e545f034.zip
gcc-5667c33d018a6f97ce58985a46c6f4e6e545f034.tar.gz
gcc-5667c33d018a6f97ce58985a46c6f4e6e545f034.tar.bz2
class.c (build_utf8_ref): Move declaration of decl_size
2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com> * class.c(build_utf8_ref): Move declaration of decl_size From-SVN: r49688
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r--gcc/java/class.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c
index 367a448..5a799fe 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -967,7 +967,7 @@ build_utf8_ref (name)
char buf[60];
tree ctype, field = NULL_TREE, str_type, cinit, string;
static int utf8_count = 0;
- int name_hash, decl_size;
+ int name_hash;
tree ref = IDENTIFIER_UTF8_REF (name);
tree decl;
if (ref != NULL_TREE)
@@ -1001,18 +1001,21 @@ build_utf8_ref (name)
TREE_THIS_VOLATILE (decl) = 0;
DECL_INITIAL (decl) = cinit;
#ifdef HAVE_GAS_SHF_MERGE
- /* Ensure decl_size is a multiple of utf8const_type's alignment. */
- decl_size = (name_len + 5 + TYPE_ALIGN_UNIT (utf8const_type) - 1)
- & ~(TYPE_ALIGN_UNIT (utf8const_type) - 1);
- if (flag_merge_constants && decl_size < 256)
- {
- char buf[32];
- int flags = (SECTION_OVERRIDE
- | SECTION_MERGE | (SECTION_ENTSIZE & decl_size));
- sprintf (buf, ".rodata.jutf8.%d", decl_size);
- named_section_flags (buf, flags);
- DECL_SECTION_NAME (decl) = build_string (strlen (buf), buf);
- }
+ {
+ int decl_size;
+ /* Ensure decl_size is a multiple of utf8const_type's alignment. */
+ decl_size = (name_len + 5 + TYPE_ALIGN_UNIT (utf8const_type) - 1)
+ & ~(TYPE_ALIGN_UNIT (utf8const_type) - 1);
+ if (flag_merge_constants && decl_size < 256)
+ {
+ char buf[32];
+ int flags = (SECTION_OVERRIDE
+ | SECTION_MERGE | (SECTION_ENTSIZE & decl_size));
+ sprintf (buf, ".rodata.jutf8.%d", decl_size);
+ named_section_flags (buf, flags);
+ DECL_SECTION_NAME (decl) = build_string (strlen (buf), buf);
+ }
+ }
#endif
TREE_CHAIN (decl) = utf8_decl_list;
layout_decl (decl, 0);