Summary: Compiler flag löegality checking ignores existing
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Thu 17 Nov 2011 01:39:39 AM EET
                Category: bootstrap
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: Ready For Test
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None
         Planned Release: 2.2.8, 2.3.1, 2.4.0, 2.5.0



compiler.m4 flag checking macros do not check if proposed flag works together
with flags already in target variable.
One could argue (as I did until now) that there's no bug in that. Those
macros have never been advertised as having such check, and they take optional
parameter for extra flags where use can pass existing flags if so wishes.
I now decided to make this a bug (instead of patch ticket) since it's hard to
imagine a case where check with existing flags is not wanted - since they go
to the same variable, user is certainly going to use them together, and
passing existing values in extra flags parameter is cumbersome. In fact,
existing code never does pass existing flags, though every place should.

Attached fix makes those macros to make checks with existing flags in target
variable set.

It's worth noting that with this we avoid some clang debug build problems.
It's partly coincidence since this is not targeted against bug in question as
a whole, but this helps to avoid specific problem making clang build to fail
(namely compiler flag checking uses -Werror in critical check)


File Attachments:

Date: Thu 17 Nov 2011 01:39:39 AM EET  Name: FlagCheckExistingFlags.diff 
Size: 923B   By: cazfi



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to