[fpc-devel] symify.pp broken
rr at bttr-software.de
Fri Apr 18 17:17:27 CEST 2008
Tomas Hajny wrote:
> 1) Previously, there've been two options for OptimizingGoalSwitches, but
> there's only one now (the other is not valid any longer) - line 1217.
> 2) SetDefaultSwitches calls OptimizingGoalSwitches^.SetCurrSel with index
> _1_ (note that index is 0-based), i.e. referring to _second_ value, in
> fact (there's no second value any longer, though - see above) - line 1438.
> 3) As opposed to SetBooleanItem, SetLongintItem or SetStringItem,
> SetCurrSel unfortunately doesn't check if the selected index isn't beyond
> the amount of items within the associated collection (using ItemCount
> further referring to Items^.Count).
> 4) When writing the contents down, IDE tries accessing a non-existing
> collection item. I really wonder how it comes that it doesn't bomb out on
> other targets, I believe that it certainly should...
> If you track it down (either confirming my assumption above or finding
You did a good guess! :-)
> some other reasons) and implement a good solution, a diff is the easiest
What is "a good solution"? :-)
I just changed line 1438 to "SetCurrSel(0)" and it worked for me. File
"fp.cfg" was written properly and holds "-Os" as expected.
But wait... How do we turn "-Os" off? It's a single radio button after
"-OG" has been removed.
I prepared a patch (GNU diff) to remove "OptimizingGoalSwitches"
completely and move "-Os" to "OptimizationSwitches":
<http://www.bttr-software.de/tmp/fpide_os.zip> Please review it for
mistakes, because I'm not very familiar with *Vision/OOP! :-)
Afterwards I realized "Level x optimizations" being check boxes. I
think, that should be radio buttons instead. Furthermore "Position
independent code" and "Create smartlinkable units" seem to be at the
wrong place, because these are not "Run-time checks".
P.S.: I signed up for bugs.freepascal.org several days ago, but never
got an activation mail. :-(
More information about the fpc-devel