Issue 130819.1: Language-dependent default array ordering not specified
Section 5.4, pg 83
In section 5.4 "Array Type Entries" is the statement:
"If no ordering attribute is present, the default ordering for the source language
(which is indicated by the DW_AT_language attribute of the enclosing compilation
unit entry) is assumed."
However the default ordering is then not defined anywhere in the Standard.
Where a similar language-dependent default is used (Section 5.11 "Subrange Type Entries")
the language specific defaults are specified, as well as in the Language encodings table
in Section 7.12 "Source Languages".
DWARF Changes:
Add to section 5.13 "Subrange Type Entries" after the sentence "If no ordering
attribute is present, the default ordering for the source language (which is
indicated by the DW_AT_language attribute of the enclosing compilation unit
entry) is assumed.":
The default array ordering is DW_ORD_row_major for Ada, C, C++, Cobol, D, Go,
Haskell, Java, Modula-2, Modula-3, Objective C, Objective C++, OpenCL, Pascal,
PL/1, Python, UPC. The default array ordering is DW_ORD_col_major for Fortran.
Change the sentence in Section 7.12 from:
"Table 7.14 also shows the default lower bound, if any, assumed for an
omitted DW_AT_lower_bound attribute in the context of a DW_TAG_subrange_type
debugging information entry for each defined language"
To:
"Table 7.14 also shows the default lower bound, if any, assumed for an
omitted DW_AT_lower_bound attribute in the context of a DW_TAG_subrange_type
debugging information entry and the default array ordering for an omitted
DW_AT_ordering in the context of a DW_TAG_array_type for each defined language"
Add an additional column called "Default Array Ordering" to Table 7.14:
"Language encodings" which contains the following values:
DW_LANG_C89 DW_ORD_row_major
DW_LANG_C DW_ORD_row_major
DW_LANG_Ada83 DW_ORD_row_major
DW_LANG_C_plus_plus DW_ORD_row_major
DW_LANG_Cobol74 DW_ORD_row_major
DW_LANG_Cobol85 DW_ORD_row_major
DW_LANG_Fortran77 DW_ORD_col_major
DW_LANG_Fortran90 DW_ORD_col_major
DW_LANG_Pascal83 DW_ORD_row_major
DW_LANG_Modula2 DW_ORD_row_major
DW_LANG_Java DW_ORD_row_major
DW_LANG_C99 DW_ORD_row_major
DW_LANG_Ada95 DW_ORD_row_major
DW_LANG_Fortran95 DW_ORD_col_major
DW_LANG_PL1 DW_ORD_row_major
DW_LANG_ObjC DW_ORD_row_major
DW_LANG_ObjC_plus_plus DW_ORD_row_major
DW_LANG_UPC DW_ORD_row_major
DW_LANG_D DW_ORD_row_major
DW_LANG_Python DW_ORD_row_major
DW_LANG_OpenCL DW_ORD_row_major
DW_LANG_Go DW_ORD_row_major
DW_LANG_Modula3 DW_ORD_row_major
DW_LANG_Haskell DW_ORD_row_major
---
Revised 11/19/2013.
Withdrawn 11/20/2013: Defer to language definition.