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

List:       kdevelop-bugs
Subject:    [Bug 307629] New: Function pointers with parameters have incorrect type
From:       <teemu.patana () gmail ! com>
Date:       2012-09-30 18:18:08
Message-ID: bug-307629-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]

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

            Bug ID: 307629
          Severity: normal
           Version: 4.3.1
          Priority: NOR
          Assignee: kdevelop-bugs@kdevelop.org
           Summary: Function pointers with parameters have incorrect type
    Classification: Unclassified
                OS: Linux
          Reporter: teemu.patana@gmail.com
          Hardware: Archlinux Packages
            Status: UNCONFIRMED
         Component: cpp-parser
           Product: kdevelop

A function pointer loses it's parameters when viewing the type.

It's quite annoying to use OpenGL with KDevelop because the functions are used
through function pointers and the KDevelop's autocompletion popup thingie
doesn't tell anything about the function's parameters. GLEW (OpenGL Wrapper
library) makes things even more dirty by using macros for the functions, and
then it's impossible to autocomplete the function's (=macro's) name. 

Reproducible: Always

Steps to Reproduce:
1. Create a new C++ project
2. Copy and paste this to the main function:
void (*funcptr)(int x);
funcptr(0);
3. Autocomplete funcptr and see what kind of parameters it takes (ctrl+space)
Actual Results:  
It tells that the type is void *funcptr.

Expected Results:  
It should tell the correct type for the function pointer, with it's parameters.

It seems that in GLEW the function pointers are wrapped in macros like this:
#define GLEW_GET_FUN(x) x
#define glUseProgram GLEW_GET_FUN(__glewUseProgram)

And it's not possible to autocomplete the macro "glUseProgram"

-- 
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