digitalmars.D - LDC predefined identifiers
- Brad Roberts (53/53) Jun 07 2009 I'm in the process of updating the version.html list of predefined ident...
- Frits van Bommel (3/7) Jun 07 2009 Just search for "addPredefinedGlobalIdent" on this page:
- Brad Roberts (6/17) Jun 07 2009 Thanks. I've added them. I'm not particularly excited about the way th...
- Christian Kamm (8/12) Jun 07 2009 trunk/2.0/version.html#PredefinedVersions
- Brad Roberts (15/28) Jun 07 2009 I opted to ignore GDC as it's update rate for way too many years has bee...
- Robert Clipsham (5/42) Jun 08 2009 Dunno if anyone else thinks this, but the operating system looks very
- Robert Fraser (11/15) Jun 08 2009 Neither side seems to want to budge on this (rather pointless, IMO)
- Christian Kamm (5/16) Jun 08 2009 The problem with removing one set of duplicates is that it introduces an...
- bearophile (25/26) Jun 08 2009 I can see names like:
- Brad Roberts (5/37) Jun 08 2009 My goal wasn't to start a complete overhaul of the identifiers. That'd ...
- Leandro Lucarella (12/29) Jun 08 2009 I'm wondering if it's ok to include compiler-specific switches into the
- Brad Roberts (21/45) Jun 08 2009 I'm fine with dropping parts, this was a starting point. On the table t...
- Leandro Lucarella (18/66) Jun 08 2009 I'm not sure about mingw32 either, but I think it's not used in LDC
I'm in the process of updating the version.html list of predefined identifiers. I'd like to include the identifiers that are produced by LDC as well as validate that there aren't conflicts or contradictions between the compilers. I know there was a thread about this a while back. What's the current state for LDC? See also: http://d.puremagic.com/issues/show_bug.cgi?id=2994 The ddoc file, with some not yet committed edits: $(TABLE2 Compiler Vendors $(TR $(TH Identifier) $(TH Description)) $(TR $(TD $(B DigitalMars)) $(TD Digital Mars compilers)) ) $(TABLE2 CPU Architectures $(TR $(TH Identifier) $(TH Description)) $(TR $(TD $(B X86)) $(TD Intel and AMD 32 bit processors)) $(TR $(TD $(B X86_64)) $(TD AMD and Intel 64 bit processors)) ) $(TABLE2 Operating Systems $(TR $(TH Identifier) $(TH Description)) $(V2 $(TR $(TD $(B FreeBSD)) $(TD All Linux systems))) $(TR $(TD $(B linux)) $(TD All linux systems)) $(V2 $(TR $(TD $(B Posix)) $(TD All posix systems))) $(V2 $(TR $(TD $(B Solaris)) $(TD All Solaris systems))) $(TR $(TD $(B Windows)) $(TD Microsoft Windows systems)) $(TR $(TD $(B Win32)) $(TD Microsoft 32 bit Windows systems)) $(TR $(TD $(B Win64)) $(TD Microsoft 64 bit Windows systems)) ) $(TABLE2 Various features $(TR $(TH Identifier) $(TH Description)) $(TR $(TD $(B LittleEndian)) $(TD Byte order, least significant first)) $(TR $(TD $(B BigEndian)) $(TD Byte order, most significant first)) $(TR $(TD $(B D_Coverage)) $(TD $(LINK2 code_coverage.html, Code coverage analysis) instrumentation (command line $(LINK2 dmd-windows.html#switches, switch) $(B -cov)) is being generated)) $(TR $(TD $(B D_Ddoc)) $(TD $(LINK2 ddoc.html, Ddoc) documentation (command line $(LINK2 dmd-windows.html#switches, switch) $(B -D)) is being generated)) $(TR $(TD $(B D_InlineAsm_X86)) $(TD $(LINK2 iasm.html, Inline assembler) for X86 is implemented)) $(TR $(TD $(B D_InlineAsm_X86_64)) $(TD $(LINK2 iasm.html, Inline assembler) for X86-64 is implemented)) $(V2 $(TR $(TD $(B D_NET)) $(TD The .NET D compiler))) $(TR $(TD $(B D_LP64)) $(TD Pointers are 64 bits (command line $(LINK2 dmd-windows.html#switches, switch) $(B -m64)))) $(TR $(TD $(B D_PIC)) $(TD Position Independent Code (command line $(LINK2 dmd-windows.html#switches, switch) $(B -fPIC)) is being generated)) $(V2 $(TR $(TD $(B unittest)) $(TD Unit tests are enabled (command line $(LINK2 dmd-windows.html#switches, switch) $(B -unittest))))) $(V2 $(TR $(TD $(B D_Version2)) $(TD This is a D version 2 compiler))) $(TR $(TD $(B none)) $(TD Never defined; used to just disable a section of code)) $(TR $(TD $(B all)) $(TD Always defined; used as the opposite of $(B none))) ) Thanks, Brad
Jun 07 2009
Brad Roberts wrote:I'm in the process of updating the version.html list of predefined identifiers. I'd like to include the identifiers that are produced by LDC as well as validate that there aren't conflicts or contradictions between the compilers. I know there was a thread about this a while back. What's the current state for LDC?Just search for "addPredefinedGlobalIdent" on this page: http://www.dsource.org/projects/ldc/browser/gen/main.cpp
Jun 07 2009
Frits van Bommel wrote:Brad Roberts wrote:Thanks. I've added them. I'm not particularly excited about the way this looks, but take a peek: http://www.puremagic.com/~braddr/phobos-trunk/2.0/version.html#PredefinedVersions Thanks, BradI'm in the process of updating the version.html list of predefined identifiers. I'd like to include the identifiers that are produced by LDC as well as validate that there aren't conflicts or contradictions between the compilers. I know there was a thread about this a while back. What's the current state for LDC?Just search for "addPredefinedGlobalIdent" on this page: http://www.dsource.org/projects/ldc/browser/gen/main.cpp
Jun 07 2009
Brad Roberts wrote:Thanks. I've added them. I'm not particularly excited about the way this looks, but take a peek: http://www.puremagic.com/~braddr/phobos-trunk/2.0/version.html#PredefinedVersions Looks good to me. You've missed darwin (ldc only) though, while OSX works on both ldc and dmd. Shouldn't X86_64 and D_InlineAsm_X86_64 also be ldc only? I couldn't find it in gdc's documentation, but I think it uses freebsd, darwin and solaris and does not support the capitalized identifiers. By the way, a neater list of ldc's version identifiers is available at http://www.dsource.org/projects/ldc/wiki/Docs#Versions
Jun 07 2009
Christian Kamm wrote:Brad Roberts wrote:Fixed.Thanks. I've added them. I'm not particularly excited about the way this looks, but take a peek: http://www.puremagic.com/~braddr/phobos-trunk/2.0/version.html#PredefinedVersions Looks good to me. You've missed darwin (ldc only) though, while OSX works on both ldc and dmd. Shouldn't X86_64 and D_InlineAsm_X86_64 also be ldc only?I couldn't find it in gdc's documentation, but I think it uses freebsd, darwin and solaris and does not support the capitalized identifiers.I opted to ignore GDC as it's update rate for way too many years has been all but zilch. I'd love to see it alive and kicking and re-joining the ranks of D compilers.. and if it does, then we can re-address the list then. I'm concerned at the differences just between dmd and ldc. The multiple capitalizations are just going to cause grief if/when people use the ones that are ldc specific. I'm also open to suggestions on how to better manage the last block. It's a bit of a mismash of random identifiers.By the way, a neater list of ldc's version identifiers is available at http://www.dsource.org/projects/ldc/wiki/Docs#VersionsI liked the use of the src, it wass more likely to be accurate. :) Walter, any objection to me submitting the changes to version.dd or would you prefer that I send you a patch to look at first? Later, Brad
Jun 07 2009
Brad Roberts wrote:Christian Kamm wrote:Dunno if anyone else thinks this, but the operating system looks very confusing with all the LDC only identifiers mixed in. I think it'd be a good idea to find out which of them are "deprecated" and remove them, eg only keeping one of either solaris or Solaris etc.Brad Roberts wrote:Fixed.Thanks. I've added them. I'm not particularly excited about the way this looks, but take a peek: http://www.puremagic.com/~braddr/phobos-trunk/2.0/version.html#PredefinedVersions Looks good to me. You've missed darwin (ldc only) though, while OSX works on both ldc and dmd. Shouldn't X86_64 and D_InlineAsm_X86_64 also be ldc only?I couldn't find it in gdc's documentation, but I think it uses freebsd, darwin and solaris and does not support the capitalized identifiers.I opted to ignore GDC as it's update rate for way too many years has been all but zilch. I'd love to see it alive and kicking and re-joining the ranks of D compilers.. and if it does, then we can re-address the list then. I'm concerned at the differences just between dmd and ldc. The multiple capitalizations are just going to cause grief if/when people use the ones that are ldc specific. I'm also open to suggestions on how to better manage the last block. It's a bit of a mismash of random identifiers.By the way, a neater list of ldc's version identifiers is available at http://www.dsource.org/projects/ldc/wiki/Docs#VersionsI liked the use of the src, it wass more likely to be accurate. :) Walter, any objection to me submitting the changes to version.dd or would you prefer that I send you a patch to look at first? Later, Brad
Jun 08 2009
Robert Clipsham wrote:Dunno if anyone else thinks this, but the operating system looks very confusing with all the LDC only identifiers mixed in. I think it'd be a good idea to find out which of them are "deprecated" and remove them, eg only keeping one of either solaris or Solaris etc.Neither side seems to want to budge on this (rather pointless, IMO) matter. LDC chose the identifiers first. Then DMD got support for Solaris, FreeBSD, and OSX, and chose different identifiers. LDC added DMD's but decided not to deprecate their own (probably because they were already in use in Tango). I also wonder why there's a Win32 and a Win64... I don't see a Linux64, so why is Windows so special? I know Win32 has been around in D for a while, but in that case, WIn32 should be defined even on 64-bit Windows targets for compatibility reasons (like %WINDIR%/System32 is kept as System32 even on 64-bit platforms).
Jun 08 2009
Robert Fraser wrote:Robert Clipsham wrote:The problem with removing one set of duplicates is that it introduces an incompatibility with either DMD or GDC. I've adjusted the LDC documentation to recommend Walter's identifiers; the last discussion was unable to convince him to change them and I'd guess it's the one with more users.Dunno if anyone else thinks this, but the operating system looks very confusing with all the LDC only identifiers mixed in. I think it'd be a good idea to find out which of them are "deprecated" and remove them, eg only keeping one of either solaris or Solaris etc.Neither side seems to want to budge on this (rather pointless, IMO) matter. LDC chose the identifiers first. Then DMD got support for Solaris, FreeBSD, and OSX, and chose different identifiers. LDC added DMD's but decided not to deprecate their own (probably because they were already in use in Tango).
Jun 08 2009
Brad Roberts:I'm not particularly excited about the way this looks, but take a peek:<I can see names like: LDC LLVM LLVM64 Win64 Win32 Windows D_Version2 => They may become more orthogonal, and there's no need to keep both LDC and LLVM: Bit_64 Bit_32 Windows Linux Compiler_LDC Compiler_DMD Compiler_GDC Stdlib_Phobos Stdlib_Tango D_Version_1 D_Version_2 And some more. Bye, bearophile
Jun 08 2009
bearophile wrote:Brad Roberts:My goal wasn't to start a complete overhaul of the identifiers. That'd cause way more grief than just creating the list for only a small amount of gain. Later, BradI'm not particularly excited about the way this looks, but take a peek:<I can see names like: LDC LLVM LLVM64 Win64 Win32 Windows D_Version2 => They may become more orthogonal, and there's no need to keep both LDC and LLVM: Bit_64 Bit_32 Windows Linux Compiler_LDC Compiler_DMD Compiler_GDC Stdlib_Phobos Stdlib_Tango D_Version_1 D_Version_2 And some more. Bye, bearophile
Jun 08 2009
Brad Roberts, el 7 de junio a las 18:53 me escribiste:Frits van Bommel wrote:I'm wondering if it's ok to include compiler-specific switches into the specs, isn't that against an specification? I guess it's better just to list the "standard" identifiers only and let compiler documentation list compiler specific ones. I think the specs should be more and more compiler independent, not the other way around =) -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ----------------------------------------------------------------------------Brad Roberts wrote:Thanks. I've added them. I'm not particularly excited about the way this looks, but take a peek: http://www.puremagic.com/~braddr/phobos-trunk/2.0/version.html#PredefinedVersionsI'm in the process of updating the version.html list of predefined identifiers. I'd like to include the identifiers that are produced by LDC as well as validate that there aren't conflicts or contradictions between the compilers. I know there was a thread about this a while back. What's the current state for LDC?Just search for "addPredefinedGlobalIdent" on this page: http://www.dsource.org/projects/ldc/browser/gen/main.cpp
Jun 08 2009
Leandro Lucarella wrote:Brad Roberts, el 7 de junio a las 18:53 me escribiste:I'm fine with dropping parts, this was a starting point. On the table to drop from the docs: 1) the entire Compiler Vendors block 2) darwin 3) freebsd 4) mingw32 ? 5) solaris More? Less? My goal is to document what users should know about being able to write code that will work with any D compiler. Calling out the differences highlights problem areas that exist today. It's _ok_ that the predefined version identifiers don't line up 100%, that's to be expected due to differences that don't cause grief. For example, the cpu architecture differences and the 32 vs 64 bit differences. What's not ok is solaris vs Solaris (for example). That just adds confusion. I'm not going to be the guy to decide which is right.. the ldc developers and walter can yell at each other until one caves. But, please, one side cave so there's just one. Later, BradFrits van Bommel wrote:I'm wondering if it's ok to include compiler-specific switches into the specs, isn't that against an specification? I guess it's better just to list the "standard" identifiers only and let compiler documentation list compiler specific ones. I think the specs should be more and more compiler independent, not the other way around =)Brad Roberts wrote:Thanks. I've added them. I'm not particularly excited about the way this looks, but take a peek: http://www.puremagic.com/~braddr/phobos-trunk/2.0/version.html#PredefinedVersionsI'm in the process of updating the version.html list of predefined identifiers. I'd like to include the identifiers that are produced by LDC as well as validate that there aren't conflicts or contradictions between the compilers. I know there was a thread about this a while back. What's the current state for LDC?Just search for "addPredefinedGlobalIdent" on this page: http://www.dsource.org/projects/ldc/browser/gen/main.cpp
Jun 08 2009
Brad Roberts, el 8 de junio a las 09:19 me escribiste:Leandro Lucarella wrote:OkBrad Roberts, el 7 de junio a las 18:53 me escribiste:I'm fine with dropping parts, this was a starting point.Frits van Bommel wrote:I'm wondering if it's ok to include compiler-specific switches into the specs, isn't that against an specification? I guess it's better just to list the "standard" identifiers only and let compiler documentation list compiler specific ones. I think the specs should be more and more compiler independent, not the other way around =)Brad Roberts wrote:Thanks. I've added them. I'm not particularly excited about the way this looks, but take a peek: http://www.puremagic.com/~braddr/phobos-trunk/2.0/version.html#PredefinedVersionsI'm in the process of updating the version.html list of predefined identifiers. I'd like to include the identifiers that are produced by LDC as well as validate that there aren't conflicts or contradictions between the compilers. I know there was a thread about this a while back. What's the current state for LDC?Just search for "addPredefinedGlobalIdent" on this page: http://www.dsource.org/projects/ldc/browser/gen/main.cppOn the table to drop from the docs: 1) the entire Compiler Vendors block 2) darwin 3) freebsd 4) mingw32 ? 5) solaris More? Less?I'm not sure about mingw32 either, but I think it's not used in LDC anymore (at least I saw some commits that replaced the use of mingw32 with Windows). I'll remove LLVM64 too, the Notes column (at least the current notes about "XXX only") and comments about command line switches (unless the command-line interface for the compiler is "standarized" too, which can be nice but I don't know if that's the case).My goal is to document what users should know about being able to write code that will work with any D compiler. Calling out the differences highlights problem areas that exist today. It's _ok_ that the predefined version identifiers don't line up 100%, that's to be expected due to differences that don't cause grief. For example, the cpu architecture differences and the 32 vs 64 bit differences. What's not ok is solaris vs Solaris (for example). That just adds confusion. I'm not going to be the guy to decide which is right.. the ldc developers and walter can yell at each other until one caves. But, please, one side cave so there's just one.Agreed. LDC support both, but having one of the flavors deprecated and one officially supported (I mean, defined by the specs) should be ideal. It would be *very* nice to have a consistent case for identifiers too (please, don't stick to linux if all other identifiers are capitalized, make Linux the official one and have the old as a deprecated identifier). -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ----------------------------------------------------------------------------
Jun 08 2009