User forums > Nightly builds

The 02 March 2014 build (9673.) is out.

<< < (2/3) > >>

ollydbg:

--- Quote from: carra on March 03, 2014, 04:34:19 pm ---Even though it's not related to version 9673 (it is MUCH older), I am going to report a bug in Code Completion since it seems to be the main improvement focus nowadays.

As far as I can remember, Code::Blocks has never provided autocompletion of a constructor's parameters within its initialization list. For instance, take this code:


--- Code: ---    ListCell::ListCell( P_Object First_, P_Object Rest_ )
    // - - - - - - - - - - - - - - - - - -
    :   First( First_ )  // <-- cursor HERE
    ,   Rest( Rest_ )
    // - - - - - - - - - - - - - - - - - -
    {
        // (do nothing)
    }

--- End code ---

When the cursor is inside the braces, CC correctly handles First_ and Rest_. But if the cursor is on the line with the arrow, I am offered completion for First (i.e. the class attribute), but not for First_.

PD: Searched for this, found nothing. Excuse me if it had already been said somewhere...

--- End quote ---
First, thanks for the report, this is a feature request. Maybe, you can put it to BerliOS, but I suggest that the new Feature Request system will translated to Sourceforge, since BerliOS will be closed in one or two months.   ;)

See: Bug/feature reqeust move to Sourceforge
berlios will close project host in 2014.04

ollydbg:
I try to extract the file wxmsw28u_gcc_cb_wx2812_gcc481-TDM.7z on a 64bit Windows 7 system with 7zip(64bit, latest alpha version), but it failed. The other 7z file works fine. Not surer what is the problem. It works OK on a 32bit Windows XP system (with 32bit 7zip). I download this file again, and the problem is gone, sorry for the noise.

carra:
Thanks ollydbg, I did submit the request to BerliOS (pretty much a copy-paste of my previous post). You can find it here: https://developer.berlios.de/feature/index.php?func=detailfeature&feature_id=5734&group_id=5358

White-Tiger:
since there are some CC improvements.... I would like to see some bugs fixed as well ;)
It happens from time to time that CC doesn't recognize specific functions, normally it's just 1-2 functions in a file... but using Microsoft MFC inside a project, almost completely kills CC.
As soon as a message map is used, CC is gone for everything below that.

Here's some test code (based on MFC code but slightly modified to minimize it)

--- Quote from: cpp ---#define PTM_WARNING_DISABLE
#define PTM_WARNING_RESTORE
struct AFX_MSGMAP_ENTRY;
struct AFX_MSGMAP
{
   const AFX_MSGMAP* (*pfnGetBaseMap)();
   const AFX_MSGMAP_ENTRY* lpEntries;
};
#define BEGIN_MESSAGE_MAP(theClass, baseClass) \
   PTM_WARNING_DISABLE \
   const AFX_MSGMAP* theClass::GetMessageMap() const \
      { return GetThisMessageMap(); } \
   const AFX_MSGMAP* theClass::GetThisMessageMap() \
   { \
      typedef theClass ThisClass;                     \
      typedef baseClass TheBaseClass;                  \
      static const AFX_MSGMAP_ENTRY _messageEntries[] =  \
      {
#define END_MESSAGE_MAP() \
      {0, 0, 0, 0, 0, 0 } \
   }; \
      static const AFX_MSGMAP messageMap = \
      { &TheBaseClass::GetThisMessageMap, &_messageEntries[0] }; \
      return &messageMap; \
   }                          \
   PTM_WARNING_RESTORE
struct AFX_MSGMAP_ENTRY{
   int a,b,c,d,e,f;
};
class BaseClass{
   virtual AFX_MSGMAP* GetThisMessageMap();
public:
   virtual AFX_MSGMAP* GetMessageMap();
};
class SomeClass : public BaseClass{
   AFX_MSGMAP* GetThisMessageMap();
public:
   AFX_MSGMAP* GetMessageMap();
};

/// known functions
void mynonmissingfunc1(){
}
void mynonmissingfunc2(){
}

BEGIN_MESSAGE_MAP(SomeClass, BaseClass)
// [...]
END_MESSAGE_MAP()/// somehow ignored

//} }/// uncomment this to detect all functions (in my real world example, I didn't need two "}" but one)

/// unknown functions
void mymissingfunc1(){
}
void mymissingfunc2(){
}
void mymissingfunc3(){
}

--- End quote ---

PS: I once had to declare "AFX_MSGMAP_ENTRY" without forward declaration... and it worked... dunno if that was real or not xD

ollydbg:

--- Quote from: White-Tiger on March 06, 2014, 03:04:00 am ---since there are some CC improvements.... I would like to see some bugs fixed as well ;)
It happens from time to time that CC doesn't recognize specific functions, normally it's just 1-2 functions in a file... but using Microsoft MFC inside a project, almost completely kills CC.
As soon as a message map is used, CC is gone for everything below that.

Here's some test code (based on MFC code but slightly modified to minimize it)
...

--- End quote ---
Hi, firstly, thanks for the minimal code. We have already said that CC's parsing don't expand macros on every Token. So

--- Code: ---BEGIN_MESSAGE_MAP(SomeClass, BaseClass)
// [...]
END_MESSAGE_MAP()

--- End code ---
When it see BEGIN_MESSAGE_MAP, it don't expand it, same as END_MESSAGE_MAP().
The method you can do is to add one rule (manually replacement rule) in CC's setting dialog.

--- Code: ---BEGIN_EVENT_TABLE -> -END_EVENT_TABLE

--- End code ---
So, those blocks were ignored. I think the document of such option should be updated in Code Completion Design - CodeBlocks, currently it is wrong.

Also, if CC did try to expand every token, then it should work. See Huki's comments here: Re: X Macro. Your problem is much like the X Macro problem.



--- Quote ---PS: I once had to declare "AFX_MSGMAP_ENTRY" without forward declaration... and it worked... dunno if that was real or not xD

--- End quote ---
Not fully understand this sentence, can you show a minimal sample code? Thanks.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version