------- Comment #41 from dannysmith at users dot sourceforge dot net 2008-10-06 20:18 ------- (In reply to comment #35)
> As I suspected. The PE/COFF file format does not provide for specifying > the alignment of commons. > > Hmm, I wonder if gcc should complain if it finds aligned commons with > COFF backends or if we should try to generate a GNU extension to the > COFF format. > Aligned commons are not part of the PE COFF spec and AFAICT neither MASM nor NASM provide a way to specify aligned commons. I am afraid that a GNU extension will cause object incompatibility, so it would it need to be a non-default option. We already have -fno-common __attribute__((no_common)) #pragma gcc optimize (no_common) G++ already puts commons in .bss Perhaps a new option -fno_large_common that applies -fcommon only to objects with align <= 4 bytes? A warning would be useful in any case. Danny -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216