r189175 - Add gcc ARM flags -munaligned-access / -mno-unaligned-access

Renato Golin renato.golin at linaro.org
Tue Aug 27 01:11:38 PDT 2013


On 26 August 2013 21:06, Reid Kleckner <rnk at google.com> wrote:

> On Sat, Aug 24, 2013 at 7:44 AM, Renato Golin <renato.golin at linaro.org>wrote:
>
>> Since the default value for unaligned accesses / strict alignment
>> depends on the tripple, both the enable and disable flags are added.
>> If both are set, the no-unaligned-access is used.
>>
>
> Isn't the usual pattern that the last one wins?
>

Hi Reid,

This is a good point, but in this specific case, it's a bit of a grey area.

Basically, what "no-unaligned-access" is saying is that exceptions will be
caught if there is any unaligned access, while "unaligned-access" is less
strict, only meaning that "AFAIK, no exceptions will be caught". So, if
someone building the command line option knows that exceptions will be
caught, we should err in the side of safety, and not rely on build systems
to get that right.

That said, I agree it's a bit too much, and build systems should be able to
change the compilation parameters without re-writing the whole argument
list. But I'm not sure how safe that is.

I don't have that strong an opinion to keep things as they are, but I also
wouldn't change unless there is a good reason (or consensus) to do so.

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130827/ef839b71/attachment.html>


More information about the cfe-commits mailing list