[PATCH] use the last passed -munaligned-access / -mno-unaligned-access

Jeroen Hofstee clang at myspectrum.nl
Wed Aug 28 12:44:05 PDT 2013


On 08/28/2013 09:33 PM, Jeroen Hofstee wrote:
> Hello Renato and others,
>
> On 08/27/2013 11:20 AM, Renato Golin wrote:
>> On 27 August 2013 09:24, Dmitri Gribenko <gribozavr at gmail.com 
>> <mailto:gribozavr at gmail.com>> wrote:
>>
>>     On Tue, Aug 27, 2013 at 1:11 AM, Renato Golin
>>     <renato.golin at linaro.org <mailto:renato.golin at linaro.org>> wrote:
>>     > 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.
>>
>>     In my opinion, consistency is a pretty good reason.
>>
>>
>> That's where the grey area is... Do we strive to be consistent with 
>> the previous behaviour, or with other flags?
>>
>> The former, how it's implemented now, is that a "strict-align" flag 
>> would taint the whole argument list, since there was no way to 
>> "un-taint". The latter, would change how "strict-align" behaves, 
>> being more consistent with other flags, but less consistent with its 
>> former self.
>>
>> Jeroen, do you have any input in this? Any special reason for not 
>> having made like other dual flags?
>>
>
> No special reason, I must have been in a good mood I guess.
> I would like it even more to throw an error at the user for passing
> such inconsistent flags, with the question to make up his / her mind
> and filter-out one of them. Or preferably not add them both in the
> first place.
>
> Luckily we don't have to discuss that, for the simple fact gcc seems
> to use the last flag and clang seems to follow accordingly. Patches
> attached, intended to match that behaviour.

follow up: Updated the subject and removed personal comment from the test.

Regards,
Jeroen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130828/ce73fac0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiple-alignment-flags.patch
Type: text/x-patch
Size: 1689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130828/ce73fac0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiple-alignment-flags-test.patch
Type: text/x-patch
Size: 1509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130828/ce73fac0/attachment-0001.bin>


More information about the cfe-commits mailing list