[Dwarf-Discuss] C++14 and C++03 (vs C++98)
Hi, I just submitted an issue proposal for adding DW_LANG_C_plus_plus_14. But don't have an issue number yet. See proposal below. I also had a question about issue 120628.1 which proposes to add DW_LANG_C_plus_plus_03. The current DWARFv4 DW_LANG_C_plus_plus says it is for ISO C++:1998. As far as I know C++03 (unlike C++11 and C++14) didn't add any language changes, so I think for producers and consumers C++98 and C++03 look similar. When would consumers expect to see DW_LANG_C_plus_plus and when DW_LANG_C_plus_plus_03? Thanks, Mark Subject: c++14 DW_LANG constant Name: Mark Wielaard Email: m...@redhat.com Section: 3.1 Page: 44 Type: Enhancement In August C++14 ISO/IEC 14882:2014(E) was adopted. Since this version of C++ adds some new language constructs and changes the semantics of some constructs it is useful for debuggers to know the source language was C++14. Page 44, Section 3.1.1, Figure 8. Language names add: DW_LANG_C_plus_plus_14ISO/IEC 14882:2014(E) Page 172, Section 7.12, Figure 31. Language encodings add: DW_LANG_C_plus_plus_140x001X0 ___ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
Re: [Dwarf-Discuss] C++14 and C++03 (vs C++98)
On 10/08/2014 06:57 AM, Mark Wielaard wrote: I just submitted an issue proposal for adding DW_LANG_C_plus_plus_14. But don't have an issue number yet. See proposal below. I also had a question about issue 120628.1 which proposes to add DW_LANG_C_plus_plus_03. The current DWARFv4 DW_LANG_C_plus_plus says it is for ISO C++:1998. As far as I know C++03 (unlike C++11 and C++14) didn't add any language changes, so I think for producers and consumers C++98 and C++03 look similar. When would consumers expect to see DW_LANG_C_plus_plus and when DW_LANG_C_plus_plus_03? Agreed, C++03 is just C++98 with some DRs. Actually, it's not clear to me why we need multiple standard levels at all. What differences are there that aren't directly expressed by new TAGs and such? Jason ___ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
Re: [Dwarf-Discuss] C++14 and C++03 (vs C++98)
On Wed, 2014-10-08 at 08:13 -0400, Jason Merrill wrote: > Actually, it's not clear to me why we need multiple standard levels at > all. What differences are there that aren't directly expressed by new > TAGs and such? It is mainly for consumers that allow users to interact with the program described through DWARF. For example a debugger might want to know which expressions are valid (e.g. is restrict a keyword or not). This matters for example when someone copy/pastes some expression in the source code from the program to be evaluated at at a certain breakpoint. Another reason is indeed for things that aren't currently expressed in DWARF, but could be derived from other properties. The one that comes to mind wrt C++14 vs C++11 from our recent discussions is the concept of trivially copyable types (earlier c++ versions treats cv-qualified types differently from C++14, which excludes volatile cv-qualified types in certain cases). In that specific case we could of course come up with a proposal to express that property with a DWARF attribute that is language (version) independent, but I don't know if we can identify all such properties for C++14 in time before DWARFv5 is finalized and properly evaluate it in implementations to make the need for consumers to distinguish between different versions of the source language moot. Cheers, Mark ___ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org