View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027014 | FPC | Compiler | public | 2014-11-07 22:45 | 2014-12-15 11:42 |
Reporter | Juha Manninen | Assigned To | Tomas Hajny | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.7.1 | ||||
Target Version | 3.0.0 | Fixed in Version | 3.0.0 | ||
Summary | 0027014: [patch] Mention "fpc -i" section precisely in "fpc -h" output | ||||
Description | The patch replaces "see fpc -i for possible values" with "see values in fpc -i Supported ..." where "Supported ..." is the exact section name listed in "fpc -i" output. There are also 2 platform specific lines which I don't know how to change. Can somebody please do it. A*2Wpxxxx_Specify the controller type, see fpc -i for possible values V*2Wpxxxx_Specify the controller type, see fpc -i for possible values The idea is to make the parsed in Lazarus more robust. It supports the GUI for all FPC options and directly reads from "fpc -h" and "fpc -i". Now the sections are hardcoded in the parser. It misses the platform specific ones I cannot test. I know I could add heuristics for the parser to find the right section but that is not robust. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 29032 | ||||
FPCOldBugId | |||||
FPCTarget | |||||
Attached Files |
|
|
errore.patch (2,557 bytes)
Index: compiler/msg/errore.msg =================================================================== --- compiler/msg/errore.msg (revision 29005) +++ compiler/msg/errore.msg (working copy) @@ -3469,12 +3469,12 @@ **1B_Build all modules **1C<x>_Code generation options: **2C3_Turn on ieee error checking for constants -**2Ca<x>_Select ABI, see fpc -i for possible values +**2Ca<x>_Select ABI, see values in fpc -i Supported ABI targets **2Cb_Generate code for a big-endian variant of the target architecture **2Cc<x>_Set default calling convention to <x> **2CD_Create also dynamic library (not supported) **2Ce_Compilation with emulated floating point opcodes -**2Cf<x>_Select fpu instruction set to use, see fpc -i for possible values +**2Cf<x>_Select fpu instruction set, see values in fpc -i Supported FPU instruction sets **2CF<x>_Minimal floating point constant precision (default, 32, 64) **2Cg_Generate PIC code **2Ch<n>_<n> bytes heap (between 1023 and 67107840) @@ -3484,7 +3484,7 @@ P*2CN_Generate nil-pointer checks (AIX-only) **2Co_Check overflow of integer operations **2CO_Check for possible overflow of integer operations -**2Cp<x>_Select instruction set, see fpc -i for possible values +**2Cp<x>_Select instruction set, see values in fpc -i Supported CPU instruction sets **2CP<x>=<y>_ packing settings **3CPPACKSET=<y>_ <y> set allocation: 0, 1 or DEFAULT or NORMAL, 2, 4 and 8 **2Cr_Range checking @@ -3583,10 +3583,10 @@ **2O3_Level 3 optimizations (-O2 + slow optimizations) **2O4_Level 4 optimizations (-O3 + optimizations which might have unexpected side effects) **2Oa<x>=<y>_Set alignment -**2Oo[NO]<x>_Enable or disable optimizations, see fpc -i for possible values -**2Op<x>_Set target cpu for optimizing, see fpc -i for possible values -**2OW<x>_Generate whole-program optimization feedback for optimization <x>, see fpc -i for possible values -**2Ow<x>_Perform whole-program optimization <x>, see fpc -i for possible values +**2Oo[NO]<x>_Enable or disable optimizations, see values in fpc -i Supported Optimizations +**2Op<x>_Set target cpu for optimizing, see values in fpc -i Supported CPU instruction sets +**2OW<x>_Generate whole-program optimization feedback for optimization <x>, see values in fpc -i Supported Whole Program Optimizations +**2Ow<x>_Perform whole-program optimization <x>, see values in fpc -i Supported Whole Program Optimizations **2Os_Optimize for size rather than speed **1pg_Generate profile code for gprof (defines FPC_PROFILE) F*1P<x>_Target CPU / compiler related options: |
|
The parser in Lazarus does not yet support this syntax but I will implement it soon after this is applied. |
|
Obviously, disadvantage of explicitly mentioning headlines for the individual sections is the risk of getting out of synchronization once somebody changes the header line in 'fpc -i' (and forgets about necessity to update the help accordingly). I wonder if there is some better option. Maybe an option of explicitly writing out just one particular section using "fpc -i<x>" and referring to that one in the help pages? |
|
> Obviously, disadvantage of explicitly mentioning headlines for the individual sections is the risk of getting out of synchronization once somebody changes the header line in 'fpc -i' (and forgets about necessity to update the help accordingly). Then Lazarus project gets a bug report and I will forward it to you. :) IMO the risk is small. The section headers are not changed very often I guess. > ... one particular section using "fpc -i<x>" ... You can create any syntax as long as it is precise and consistent. I will adjust the parser accordingly. |
|
The fact that it doesn't get changed often makes it more likely to be forgotten. ;-) I like the other option better and will implement it. I believe that it's better also because the current output of -i is fairly long and not very convenient if one wants to have a look just at specific syntax of one particular value in one of the sections. I'll implement it that way. It will be consistent also with other "fpc -i<x>" which are already processed in Makefiles and also your parsing will become very simple. |
|
Added support for new 'fpc -i<letter>' allowing to list supported values (individually or several of them together). Note that the new options may not be combined with the previously existing (uppercase) ones (e.g. -iTO), because the output of previous ones were individual words, whereas these always result in a list and the combination might not be parsed as easily any longer). |
|
The parser in Lazarus now supports this feature and works well. Thanks. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-11-07 22:45 | Juha Manninen | New Issue | |
2014-11-07 22:45 | Juha Manninen | File Added: errore.patch | |
2014-11-07 22:49 | Juha Manninen | Note Added: 0078991 | |
2014-11-08 02:32 | Tomas Hajny | Note Added: 0078996 | |
2014-11-08 02:36 | Tomas Hajny | Note Edited: 0078996 | View Revisions |
2014-11-08 10:58 | Juha Manninen | Note Added: 0079004 | |
2014-11-08 11:04 | Tomas Hajny | Assigned To | => Tomas Hajny |
2014-11-08 11:04 | Tomas Hajny | Status | new => assigned |
2014-11-08 11:12 | Tomas Hajny | Note Added: 0079005 | |
2014-11-09 17:57 | Tomas Hajny | Fixed in Revision | => 29032 |
2014-11-09 17:57 | Tomas Hajny | Note Added: 0079052 | |
2014-11-09 17:57 | Tomas Hajny | Status | assigned => resolved |
2014-11-09 17:57 | Tomas Hajny | Fixed in Version | => 2.7.1 |
2014-11-09 17:57 | Tomas Hajny | Resolution | open => fixed |
2014-11-09 17:57 | Tomas Hajny | Target Version | => 2.8.0 |
2014-12-15 11:42 | Juha Manninen | Note Added: 0079820 | |
2014-12-15 11:42 | Juha Manninen | Status | resolved => closed |