News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

The 11 February 2012 build (7789) is out.

Started by killerbot, February 12, 2012, 05:16:55 PM

Previous topic - Next topic

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

codeur

Quote from: oBFusCATed on February 27, 2012, 11:05:59 PM
SVN HEAD is as stable as it could get :)

I trust it is very stable. I am using the current head for a new release of Codeblocks EDU-Portable (in a couple of weeks).

xawari

Quote from: Alpha on February 20, 2012, 11:55:22 PM
Selection color is not accessible in most other languages simply because no one has added that tag.
There's no such lexer as default/common, it's really a bad idea to add same setting to every language. There may be someone who wants to highlight different text in different colors, of course, but in general there should be a common base. IMHO.
┌──────────────────────────────────────────────────────╖
in another thousand years we'll be machines or gods█
╘══════════════════════════════════════════════════════╝

zetab

When using the "Insert -> All method without implementation" to insert the implementation of TestFunction() for this header file:
TestClass.h

#ifndef TESTCLASS_H
#define TESTCLASS_H
class TestClass
{
public:
TestClass();
virtual ~TestClass();

int* TestFunction();
};
#endif // TESTCLASS_H


I got following code:
TestClass.cpp

#include "TestClass.h"

TestClass::TestClass(){}
TestClass::~TestClass(){}

int TestClass::TestFunction()
{
}


The return type of TestFunction missed the "*".
I have tried reparsing the project, but the problem is still there.

killerbot

many thanks for the feedback, this is indeed a serious error.
Could you please also register it at our berlios project page as a bug, otherwise it will get lost in the forum ;-)

Agetian

#20
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:


#include <stdio.h>
#include <stdlib.h>

int main()
{
   printf(
}



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.
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

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

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:


#define TEST_MACRO(x)  ((x) * (x))

int main()
{
    TEST_MACRO(
}


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

#ifndef TESTCLASS_H
#define TESTCLASS_H
class TestClass
{
public:
TestClass();
virtual ~TestClass();

int* TestFunction();
};
#endif // TESTCLASS_H


I got following code:
TestClass.cpp

#include "TestClass.h"

TestClass::TestClass(){}
TestClass::~TestClass(){}

int TestClass::TestFunction()
{
}


The return type of TestFunction missed the "*".
I have tried reparsing the project, but the problem is still there.


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. :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

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:


#define TEST_MACRO(x)  ((x) * (x))

int main()
{
    TEST_MACRO(
}



It works here, WinXP, c::b trunk.

See the screen shot below:
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Agetian

Quote from: ollydbg on March 12, 2012, 07:16:46 AM
It works here, WinXP, c::b trunk.
See the screen shot below:


Hmm, I'm not sure if it's the newer build you might be testing with (so it's already fixed?) or something OS-specific/compiler toolchain-specific; at any rate, I'm testing it with SVN 7789 (from this thread) on Windows Vista 32bit with MinGW GCC 4.6.1 (tdm-gcc). It doesn't work for me under these circumstances. :\

stefanos_

Can someone try to close multiple .xrc or .wxs and tell me if his / her system is crashing? I have tried with both svn-7789 and the latest svn-7905 and it crashes like mad.

Below you may find the generated crash report. It would help a lot your valuable feedback.

Cheers.

ollydbg

Quote from: stefanos_ on March 20, 2012, 10:23:34 PM
Can someone try to close multiple .xrc or .wxs and tell me if his / her system is crashing?
Tested under latest trunk and winXP, no crash.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Jenna

Quote from: stefanos_ on March 20, 2012, 10:23:34 PM
Can someone try to close multiple .xrc or .wxs and tell me if his / her system is crashing? I have tried with both svn-7789 and the latest svn-7905 and it crashes like mad.

Below you may find the generated crash report. It would help a lot your valuable feedback.

Cheers.
did you really clean your sozrce folder before building, especially remove the +.gch's in c::B's include ? They have moved to another place, but if old ones exist, they will probably be used by the compiler, what can lead to weird crashes.

A fresh svn-checkout is usually the easiest way to avoid such issues.

stefanos_


jens, I have forgot to mention that it's under Debian wheezy. I have created a script and it runs like this:


make clean && \
make distclean && \
./bootstrap && \
./configure --with-contrib-plugins=all && \
make && sudo make install


Up to now it was working just fine, cleaning literally everything that I could see. This issue appeared in svn-7789 and afterwards. Shall I try to uninstall it and run a clean install?