digitalmars.D - [Suggestion] Command line option: List defined version identifiers
- Stewart Gordon (37/37) Sep 14 2006 It would be useful to have a command line option that displays the
- Chris Miller (3/5) Sep 14 2006 Sounds good to me.
- Gregor Richards (3/38) Sep 14 2006 Agreed.
- Georg Wrede (4/19) Sep 15 2006 An excellent idea!
- Stewart Gordon (13/15) Sep 15 2006 I'm not entirely sure what you mean by this. If you want the compiler
- Georg Wrede (4/15) Sep 16 2006 A compiler option that outputs these values will of course be used by
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (4/6) Sep 17 2006 I don't think std.compiler is being updated, though ?
- Stewart Gordon (13/22) Sep 18 2006 That's a problem with the current std.compiler 'implementation'. It
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (11/24) Sep 15 2006 Good idea, on Mac OS X 10.3 it would be:
It would be useful to have a command line option that displays the version identifiers that are set. Maybe -versionlist or something. For example, for DMD on Win32: C:\>dmd -versionlist D_InlineAsm D_InlineAsm_X86 DigitalMars LittleEndian X86 Windows Win32 all If nothing else is on the command line, it would just print this and then exit. If any other command line options are set, then the list will be adjusted accordingly. If the name of a D file has also been given, it would parse the file and output the full list of versions that are set for the module as a result of predefined versions, -version switches, other command line switches and version assignments in the code file. Having it in DMD might encourage developers of other D compilers (particularly those that mimic DMD's CLUI, but potentially any) to implement such a facility; and then when this happens, it will become even more useful. It would provide an easy way to: - determine the name by which a compiler vendor identifies itself - determine which optional D features a given implementation supports - check which version blocks will be tested - may be useful for testing the portability of code - debug version manipulation within a module Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- C++ a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Sep 14 2006
On Thu, 14 Sep 2006 20:08:21 -0400, Stewart Gordon <smjg_1998 yahoo.com> wrote:It would be useful to have a command line option that displays the version identifiers that are set. Maybe -versionlist or something.Sounds good to me.
Sep 14 2006
Stewart Gordon wrote:It would be useful to have a command line option that displays the version identifiers that are set. Maybe -versionlist or something. For example, for DMD on Win32: C:\>dmd -versionlist D_InlineAsm D_InlineAsm_X86 DigitalMars LittleEndian X86 Windows Win32 all If nothing else is on the command line, it would just print this and then exit. If any other command line options are set, then the list will be adjusted accordingly. If the name of a D file has also been given, it would parse the file and output the full list of versions that are set for the module as a result of predefined versions, -version switches, other command line switches and version assignments in the code file. Having it in DMD might encourage developers of other D compilers (particularly those that mimic DMD's CLUI, but potentially any) to implement such a facility; and then when this happens, it will become even more useful. It would provide an easy way to: - determine the name by which a compiler vendor identifies itself - determine which optional D features a given implementation supports - check which version blocks will be tested - may be useful for testing the portability of code - debug version manipulation within a module Stewart.Agreed. - Gregor Richards
Sep 14 2006
Gregor Richards wrote:Stewart Gordon wrote:An excellent idea! I wish the compiler version number would be included. And it should naturally also be one of the identifiers like any other.It would be useful to have a command line option that displays the version identifiers that are set. Maybe -versionlist or something. For example, for DMD on Win32: C:\>dmd -versionlist D_InlineAsm D_InlineAsm_X86 DigitalMars LittleEndian X86 Windows Win32 all
Sep 15 2006
Georg Wrede wrote: <snip>I wish the compiler version number would be included. And it should naturally also be one of the identifiers like any other.I'm not entirely sure what you mean by this. If you want the compiler version number, for CC purposes or otherwise, use std.compiler. Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- C++ a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Sep 15 2006
Stewart Gordon wrote:Georg Wrede wrote: <snip>A compiler option that outputs these values will of course be used by external utilities, such as batch files, shell scripts, and other actors. But std.compiler is foremost targeted at in-code use.I wish the compiler version number would be included. And it should naturally also be one of the identifiers like any other.I'm not entirely sure what you mean by this. If you want the compiler version number, for CC purposes or otherwise, use std.compiler. Stewart.
Sep 16 2006
Stewart Gordon wrote:I'm not entirely sure what you mean by this. If you want the compiler version number, for CC purposes or otherwise, use std.compiler.I don't think std.compiler is being updated, though ? DMD 0.166 says it is "0.0" and supports D spec 0.134 --anders
Sep 17 2006
Anders F Björklund wrote:Stewart Gordon wrote:That's a problem with the current std.compiler 'implementation'. It makes no sense to add features to the language or compiler to get around this. How would such features stay up to date if this can't, anyway? Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- C++ a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.I'm not entirely sure what you mean by this. If you want the compiler version number, for CC purposes or otherwise, use std.compiler.I don't think std.compiler is being updated, though ? DMD 0.166 says it is "0.0" and supports D spec 0.134 --anders
Sep 18 2006
Stewart Gordon wrote:It would be useful to have a command line option that displays the version identifiers that are set. Maybe -versionlist or something. For example, for DMD on Win32: C:\>dmd -versionlist D_InlineAsm D_InlineAsm_X86 DigitalMars LittleEndian X86 Windows Win32 allGood idea, on Mac OS X 10.3 it would be: $ gdmd -versionlist GNU_BitsPerPointer32 GNU BigEndian PPC Unix darwin all --anders
Sep 15 2006