This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: COMMON requires 4 bytes of padding at start


2008/9/21 Tobias Burnus <burnus@net-b.de>:
> Janus Weil wrote:
>> I think this is much better.
>>
> That patch is OK for the the trunk with the following changes.

Committed as rev. 140546 (with the changes below). Thanks for the review.


> a) Can you add in
>
> +@item -Walign-commons
> +@opindex @code{Walign-commons}
> +@cindex warnings, alignment of COMMON blocks
> +@cindex alignment of COMMON blocks
> +By default, @command{gfortran} warns about any occasion of variables being
> +padded for proper alignment inside a COMMON block. This warning can be turned
> +off via @option{-Wno-align-commons}.
>
> a "See also -falign-commons." as the latter gives the background for this warning.
>
> b) For the following
>
>
>              if (gfc_option.warn_align_commons)
>                if (strcmp (common->name, BLANK_COMMON_NAME))
>                  gfc_warning ("Padding of %d bytes required before '%s' in "
>
>
> I get a warning that one should use "{ }", which stops compiling due to
> -Werror. Can you add the { } ?
>
> c) Just to make sure (because of (b)): Did you build + run the test
> suite with your modified patch? If not, you better do this before you
> commit.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]