Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Bug on function prototype

(1/2) > >>

chameleon:
I doesn't use the nightly build of CodeBlocks but I found this error:
The same function prototype appears 2 times (a little bit changed)

ollydbg:
can you give a simple test code?
From my guess, I think that this is because these two function prototypes has different signatures.

const class circleArc2 *c, const Vector & v
const circleArc2 *c, const Vector & v

But why the "class" keyword was exists in the function signature??

did you use 10.05 official version?


nanyu:
As far as I know, CC is not smart enough to do it for. For example: If I declare some member methods like:

--- Code: ---///////////////////////////
class Coo
{
    int foo1(int a, int b);
    int foo2(char const*);
    int foo3(int age /* some comment*/, int b);
};
///////////////////////////

--- End code ---
and defind those methods like:

--- Code: ---int Coo::foo1(int a
       , int b)   //b start on a new line
{}

int Coo::foo2(const char* p)
{}

int Coo::foo3(int age, int bbb)
{}

--- End code ---

then all of those function will appears 2 times on the tips windows.

oBFusCATed:
nanyu: you should be punished and humiliated in public for writing such code :lol:

nanyu:

--- Quote from: oBFusCATed on June 06, 2011, 04:49:56 pm ---nanyu: you should be punished and humiliated in public for writing such code :lol:

--- End quote ---

no, no, no.....
look at the first sample:

I am used to add the comments of it's parameters when declare a function :

--- Code: ---int foo1(int aaa  //comments of aaa
             , int bbb   //comments of bbb
             , char const* ccc //comments of ccc
             , Coo const* ddd  //comments of ddd
             );

--- End code ---

But  a clear version for imp :

--- Code: ---int foo1(int aaa, int bbb, char const* ccc, Coo const* ddd)
{
}

--- End code ---

I thinks it was not a hard thing that cc do a filtting.

Navigation

[0] Message Index

[#] Next page

Go to full version