#16 pygccxml parses const volatile variable args as just const


From: DavidHood at stargames.com.au


  • Nobody/Anonymous

    Reads pygccxml_bug.h and prints the declarations

  • Nobody/Anonymous

    I didn't realise I could only submit one file!

    If you create a file called pygccxml_bug.h with the contents:

    void PygccxmlBug(int const volatile* icv);

    When you parse the file, the output is as follows:

    free_function_t: 'PygccxmlBug'
    location: [/home/davidh/pygccxml_bug.h]:2
    artificial: 'False'
    demangled: PygccxmlBug(int const volatile*)
    mangled: _Z11PygccxmlBugPVKi
    return type: void
    arguments type: int const * icv

    The demangled function name includes int const volatile* but the arguments type is only int const*

    I believe the problem is due to the fact that the CvQualifiedType in the xml file has both the const and volatile attribute:

    <CvQualifiedType id="_128cv" type="_128" const="1" volatile="1"/>

    __read_cv_qualified_type only checks for one attribute, not both. If attrs.has_key( XML_AN_CONST ) then it doesn't check for attrs.has_key( XML_AN_VOLATILE ) even though both of these are true.

  • Roman

    Roman - 2009-01-06

    Thanks for bug reporting. I fixed the issue you reported. Sorry for late response.

  • Roman

    Roman - 2009-01-06
    • status: open --> open-fixed
  • Roman

    Roman - 2009-01-06
    • status: open-fixed --> closed-fixed

Log in to post a comment.