[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 310076] New: C++ Parser does not handle gcc __attribute annotations in class declarations
From:       Daniel Stöckel <the_docter () gmx ! net>
Date:       2012-11-14 9:57:26
Message-ID: bug-310076-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=310076

            Bug ID: 310076
          Severity: normal
           Version: 4.4.1
          Priority: NOR
          Assignee: kdevelop-bugs@kdevelop.org
           Summary: C++ Parser does not handle gcc __attribute annotations
                    in class declarations
    Classification: Unclassified
                OS: Linux
          Reporter: the_docter@gmx.net
          Hardware: Compiled Sources
            Status: UNCONFIRMED
         Component: cpp-parser
           Product: kdevelop

I have a large code base of a library that uses __attribute((visibility
("default"))) to export the classes that should be part of the interface.
KDevelop cannot handle these attributes which leads to errors in the code
completion.

Though this is a compiler specific problem (MSVC uses annotations like
__declspec(dllexport)) and thus not valid c++, this severely impedes the user
experience.

Reproducible: Always

Steps to Reproduce:
The code below is a typical example of a class declaration we use:

class __attribute((visibility ("default"))) Foo
{
    Foo* child;
};
Actual Results:  
The code completion/parser/... cannot resolve Foo in the declaration of child
as a known class.

Expected Results:  
Foo should be properly resolved, as is the case when removing the
__attribute(...)

Due to the compiler specificness of the problem the __attribute(...) is usually
wrapped in a macro. This macro evaluates to the needed annotation. KDevelop
seems to parse the macro just fine though.

-- 
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic