Bug 56236 - incorrect debug info for decltype(nullptr)
Summary: incorrect debug info for decltype(nullptr)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.6.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-07 05:32 UTC by chihin ko
Modified: 2013-02-07 08:33 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chihin ko 2013-02-07 05:32:01 UTC
g++ does not resolve decltype(nullptr) to base type nullptr_t, instead it generate following: 

  < 1><0x000005d3>    DW_TAG_unspecified_type
                      DW_AT_name                  "decltype(nullptr)"

g++ should generate something like this:

< 1><0x000005d3>    DW_TAG_base_type
                      DW_AT_name                  "nullptr_t"
                      DW_AT_encoding              DW_ATE_boolean
                      DW_AT_byte_size             0x00000004

main() {
    int i;
    decltype(nullptr) np;

    np = 0;
    i = sizeof(np);
}
Comment 1 Jakub Jelinek 2013-02-07 08:33:42 UTC
No, what g++ does is correct.  Please see
http://wiki.dwarfstd.org/index.php?title=C%2B%2B0x:_Null_pointer