/* Tell the assembler to switch to the bss section. */
void
-bss_section (decl, name)
+bss_section ()
{
if (in_section != in_bss)
{
globalize_reg (reg_number + --nregs);
}
}
- /* Specifying a section attribute on an uninitialized variable does not
- (and cannot) cause it to be put in the given section. The linker
- can only put initialized objects in specific sections, everything
- else goes in bss for the linker to sort out later (otherwise the
- linker would give a duplicate definition error for each compilation
- unit that behaved thusly). So warn the user. */
+ /* Specifying a section attribute on a variable forces it into a
+ non-.bss section, and thus it cannot be common. */
else if (TREE_CODE (decl) == VAR_DECL
&& DECL_SECTION_NAME (decl) != NULL_TREE
&& DECL_INITIAL (decl) == NULL_TREE
&& DECL_COMMON (decl))
- {
- warning_with_decl (decl,
- "section attribute ignored for uninitialized variable `%s'");
- /* Remove the section name so subsequent declarations won't see it.
- We are ignoring it, remember. */
- DECL_SECTION_NAME (decl) = NULL_TREE;
- }
+ DECL_COMMON (decl) = 0;
/* Now handle ordinary static variables and functions (in memory).
Also handle vars declared register invalidly. */
char *name;
{
char *real_name;
- int save_warn_id_clash = warn_id_clash;
+ tree id;
STRIP_NAME_ENCODING (real_name, name);
- /* Don't warn about an identifier name length clash on this name, since
- it can be a user symbol suffixed by a number. */
- warn_id_clash = 0;
- TREE_SYMBOL_REFERENCED (get_identifier (real_name)) = 1;
- warn_id_clash = save_warn_id_clash;
+ id = maybe_get_identifier (real_name);
+ if (id)
+ TREE_SYMBOL_REFERENCED (id) = 1;
if (name[0] == '*')
{
return copy_node (exp);
case COMPLEX_CST:
- return build_complex (copy_constant (TREE_REALPART (exp)),
+ return build_complex (TREE_TYPE (exp),
+ copy_constant (TREE_REALPART (exp)),
copy_constant (TREE_IMAGPART (exp)));
case PLUS_EXPR:
assemble_alias (decl, target)
tree decl, target;
{
-#ifdef ASM_OUTPUT_DEF
char *name;
make_decl_rtl (decl, (char *) 0, 1);
name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
+#ifdef ASM_OUTPUT_DEF
/* Make name accessible from other files, if appropriate. */
if (TREE_PUBLIC (decl))
ASM_OUTPUT_DEF (asm_out_file, name, IDENTIFIER_POINTER (target));
TREE_ASM_WRITTEN (decl) = 1;
#else
- warning ("alias definitions not supported in this configuration");
+#ifdef ASM_OUTPUT_WEAK_ALIAS
+ if (! DECL_WEAK (decl))
+ warning ("only weak aliases are supported in this configuration");
+
+ ASM_OUTPUT_WEAK_ALIAS (asm_out_file, name, IDENTIFIER_POINTER (target));
+ TREE_ASM_WRITTEN (decl) = 1;
+#else
+ warning ("alias definitions not supported in this configuration; ignored");
+#endif
#endif
}