diff options
author | Catherine Moore <clm@cygnus.com> | 1998-06-22 09:14:09 +0000 |
---|---|---|
committer | Catherine Moore <clm@gcc.gnu.org> | 1998-06-22 05:14:09 -0400 |
commit | 4bcfa7a853e5230c48403b4ac776cd6798fde0a6 (patch) | |
tree | 11d515adc2ad27337a15742f470349af48becc6f /gcc/varasm.c | |
parent | cd1661d6b1e0bebe318540aefa0d07981f5b236b (diff) | |
download | gcc-4bcfa7a853e5230c48403b4ac776cd6798fde0a6.zip gcc-4bcfa7a853e5230c48403b4ac776cd6798fde0a6.tar.gz gcc-4bcfa7a853e5230c48403b4ac776cd6798fde0a6.tar.bz2 |
varasm.c (assemble_variable): Emit alignment warning.
Mon Jun 22 11:10:00 1998 Catherine Moore <clm@cygnus.com>
* varasm.c (assemble_variable): Emit alignment warning.
From-SVN: r20655
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 2d595d4..1759f09 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1333,7 +1333,13 @@ assemble_variable (decl, top_level, at_end, dont_output_data) rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1; rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); - + +#if !defined(ASM_OUTPUT_ALIGNED_COMMON) && !defined(ASM_OUTPUT_ALIGNED_BSS) + if (warn_bss_align && (DECL_ALIGN (decl) / BITS_PER_UNIT) > rounded) + warning_with_decl + (decl, "requested alignment for %s is greater than implemented alignment of %d.",rounded); +#endif + #ifdef DBX_DEBUGGING_INFO /* File-scope global variables are output here. */ if (write_symbols == DBX_DEBUG && top_level) |