User forums > Nightly builds
The 11 February 2012 build (7789) is out.
Agetian:
I can confirm the error submitted by zetab, I can also say that it happens for C functions and not only for C++ classes (C functions that return char* are shown as returning char), and I have found another serious flaw with return types:
As one types a simple C program like this:
--- Code: ---#include <stdio.h>
#include <stdlib.h>
int main()
{
printf(
}
--- End code ---
Upon typing the opening bracket of the standard function 'printf', which fires the printf declaration hint, the hint will show the function as "__MINGW_NOTHROW printf(const char*, ...)" thus omitting the return type (int) and the other declarations (_CRTIMP, __cdecl). Tested with the latest nightly (from this thread) and MinGW GCC 4.6.1.
MortenMacFly:
--- Quote from: Agetian on March 09, 2012, 12:52:17 pm ---Upon typing the opening bracket of the standard function 'printf', which fires the printf declaration hint, the hint will show the function as "__MINGW_NOTHROW printf(const char*, ...)" thus omitting the return type (int) and the other declarations (_CRTIMP, __cdecl). Tested with the latest nightly (from this thread) and MinGW GCC 4.6.1.
--- End quote ---
This is known but not an easy thing to do. I've done some work on it which improves this, but not fully completed yet.
Agetian:
--- Quote from: MortenMacFly on March 09, 2012, 03:41:46 pm ---
--- Quote from: Agetian on March 09, 2012, 12:52:17 pm ---Upon typing the opening bracket of the standard function 'printf', which fires the printf declaration hint, the hint will show the function as "__MINGW_NOTHROW printf(const char*, ...)" thus omitting the return type (int) and the other declarations (_CRTIMP, __cdecl). Tested with the latest nightly (from this thread) and MinGW GCC 4.6.1.
--- End quote ---
This is known but not an easy thing to do. I've done some work on it which improves this, but not fully completed yet.
--- End quote ---
Also, I'm not sure if it's supposed to work (I think it used to work a couple builds ago, but my memory is a bit blurry), but the declaration hint is not shown for function-like macros, e.g. in this stupid little test macro:
--- Code: ---#define TEST_MACRO(x) ((x) * (x))
int main()
{
TEST_MACRO(
}
--- End code ---
ollydbg:
--- Quote from: zetab on March 09, 2012, 10:24:14 am ---When using the "Insert -> All method without implementation" to insert the implementation of TestFunction() for this header file:
TestClass.h
--- Code: ---#ifndef TESTCLASS_H
#define TESTCLASS_H
class TestClass
{
public:
TestClass();
virtual ~TestClass();
int* TestFunction();
};
#endif // TESTCLASS_H
--- End code ---
I got following code:
TestClass.cpp
--- Code: ---#include "TestClass.h"
TestClass::TestClass(){}
TestClass::~TestClass(){}
int TestClass::TestFunction()
{
}
--- End code ---
The return type of TestFunction missed the "*".
I have tried reparsing the project, but the problem is still there.
--- End quote ---
I have find the reason, see the comments in Insert all class methods without implementation malfunction
I think it can be fixed quickly, but that fix should be reviewed. :)
ollydbg:
--- Quote from: Agetian on March 11, 2012, 09:16:41 am ---Also, I'm not sure if it's supposed to work (I think it used to work a couple builds ago, but my memory is a bit blurry), but the declaration hint is not shown for function-like macros, e.g. in this stupid little test macro:
--- Code: ---#define TEST_MACRO(x) ((x) * (x))
int main()
{
TEST_MACRO(
}
--- End code ---
--- End quote ---
It works here, WinXP, c::b trunk.
See the screen shot below:
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version