Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Amazing Indexer syntax error
Amazing Indexer syntax error [message #143422] Mon, 18 April 2005 10:16 Go to next message
Eclipse UserFriend
Originally posted by: Serge.Iovleff.univ-lille1.fr

Hi,
with the following code
namespace N
{

template<class T>
class A
{ protected p;
...
};

template<class T>
class B : public A<T>
{ void foo { this->p = ...;}
...
};

} // namespace N

The indexer say that this->p is a syntax error !!!

Also the
};
is an error at the end of the class A !!!


Serge Iovleff
Re: Amazing Indexer syntax error [message #143431 is a reply to message #143422] Mon, 18 April 2005 10:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Serge.Iovleff.univ-lille1.fr

Sorry,
I'm using Eclipse 3.0
with CDT 2.1.1

Serge Iovleff
Re: Amazing Indexer syntax error [message #143442 is a reply to message #143422] Tue, 19 April 2005 02:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daehn.hmi.de

Serge Iovleff wrote:
> Hi,
> with the following code
> namespace N
> {
>
> template<class T>
> class A
> { protected p;
> ...
> };
>
> template<class T>
> class B : public A<T>
> { void foo { this->p = ...;}
> ...
> };
>
> } // namespace N
>
> The indexer say that this->p is a syntax error !!!
>
> Also the
> };
> is an error at the end of the class A !!!
>
>
> Serge Iovleff

Hi,
obviously there are several errors. First there is a ":" missing after
protected ("protected:"), second, your p needs a type (such as "int p")
and at last, the "()" is missing after "void foo" ("void foo()")
with this changes your code should compile.

cheers
Re: Amazing Indexer syntax error [message #143479 is a reply to message #143442] Tue, 19 April 2005 04:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Serge.Iovleff.univ-lille1.fr

Chrischan a écrit :
> Serge Iovleff wrote:
>
>> Hi,
>> with the following code
>> namespace N
>> {
>>
>> template<class T>
>> class A
>> { protected p;
>> ...
>> };
>>
>> template<class T>
>> class B : public A<T>
>> { void foo { this->p = ...;}
>> ...
>> };
>>
>> } // namespace N
>>
>> The indexer say that this->p is a syntax error !!!
>>
>> Also the
>> };
>> is an error at the end of the class A !!!
>>
>>
>> Serge Iovleff
>
>
> Hi,
> obviously there are several errors. First there is a ":" missing after
> protected ("protected:"), second, your p needs a type (such as "int p")
> and at last, the "()" is missing after "void foo" ("void foo()")
> with this changes your code should compile.
>
> cheers

I was lazy when writing this mail...

My code is correct and compile :)

I want just to say that the cdt indexer is detecting syntax error
in a correct code.

thanks

Serge
Re: Amazing Indexer syntax error [message #143518 is a reply to message #143479] Tue, 19 April 2005 08:49 Go to previous messageGo to next message
Eclipse UserFriend
Serge,

> > Hi,
> > obviously there are several errors. First there is a ":" missing after
> > protected ("protected:"), second, your p needs a type (such as "int p")
> > and at last, the "()" is missing after "void foo" ("void foo()")
> > with this changes your code should compile.

> I was lazy when writing this mail...
>
> My code is correct and compile :)

Don't expect people to be less lazy than you are, especially if the code
you show them is incorrect and doesn't work to illustrate the issue
you're calling their attention to.

I suggest you isolate a test case, like you did, and you just copy/paste
the code instead of re-typing it.

--
Javier Kohen <jkohen@users.sourceforge.net>
ICQ: blashyrkh #2361802
Jabber: jkohen@jabber.org
Re: Amazing Indexer syntax error [message #143533 is a reply to message #143479] Tue, 19 April 2005 10:10 Go to previous messageGo to next message
Eclipse UserFriend
Submit a patch and I'll look at it.

"Serge Iovleff" <Serge.Iovleff@univ-lille1.fr> wrote in message
news:d42ff4$7e3$1@news.eclipse.org...
> Chrischan a
Re: Amazing Indexer syntax error [message #143568 is a reply to message #143518] Tue, 19 April 2005 11:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daehn.hmi.de

Javier Kohen wrote:
> Serge,
>
>
>>>Hi,
>>>obviously there are several errors. First there is a ":" missing after
>>>protected ("protected:"), second, your p needs a type (such as "int p")
>>>and at last, the "()" is missing after "void foo" ("void foo()")
>>>with this changes your code should compile.
>
>
>>I was lazy when writing this mail...
>>
>>My code is correct and compile :)
>
>
> Don't expect people to be less lazy than you are, especially if the code
> you show them is incorrect and doesn't work to illustrate the issue
> you're calling their attention to.
>
> I suggest you isolate a test case, like you did, and you just copy/paste
> the code instead of re-typing it.
>

thanks to Javier ;)
Re: Amazing Indexer syntax error [message #143767 is a reply to message #143533] Thu, 21 April 2005 05:23 Go to previous message
Eclipse UserFriend
Originally posted by: Serge.Iovleff.univ-lille1.fr

With this piece of (correct) code, the indexer report a syntax error :

void foo()
{ int p[10];
for (int k=0; k<10; k++) p[k] = k;
for (int k=0; k<10; k++) p[k] = 1; // The indexer report an error there (k++)
}


With this too :

template < template<class> class T>
class A
{
public:
void foo(T<double> &A);
};

template< template <class> class T>
void A<T>::foo(T<double> &A) // The indexer report an error there (T<double>)
{ ;}



I could not ceate a test case for all the errors in my project.

Serge
Previous Topic:JNI: Compiled succesfull, hang on execute [3/3] "StrLen.java" (1/1)
Next Topic:C/C++ Indexer Problem???
Goto Forum:
  


Current Time: Fri May 30 20:55:23 EDT 2025

Powered by FUDForum. Page generated in 0.03688 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top