[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] parser issues in Helios
|
Whoops, I meant to write "parser issues in Indigo" in the subject. My apologies.
Nate.
----------------------------------------
> From: zeratul976@xxxxxxxxxxx
> To: cdt-dev@xxxxxxxxxxx
> Date: Fri, 10 Dec 2010 03:01:21 +0000
> Subject: [cdt-dev] parser issues in Helios
>
>
> Hello,
>
> I've tried out the Milestone 3 development build of Eclipse Indigo with
> the corresponding development build of CDT 8. It's very nice!
>
> I'm really glad to see C++0x features implemented up to what's supported
> by gcc 4.5. I think Eclipse Indigo with gcc 4.5 now has more complete
> C++0x support than any other IDE/compiler combination I'm aware of.
>
> Another nice feature is that semantic errors caught by the parser
> are now underlined in red. I previously used syntax coloring to simulate
> this feature (with the absence of proper syntax coloring indicating a
> semantic error), but the red underlines are much more explicit and give
> the reason for the error.
>
> One side effect of this feature is that as a result of imperfections in
> the parser, valid lines of code are sometimes underlined in red. I
> thought I'd point out a few cases:
>
> 1. The parser complains about the BOOST_FOREACH macro, citing a number of
> "Invalid arguments" errors:
>
> #include
> #include
> int main()
> {
> int array[3] = {1, 2, 3};
>
> BOOST_FOREACH(int i, array) // ERROR HERE
> std::cout << i << '\n';
>
> return 0;
> }
>
> 2. The parser cannot recognize certain conversions to boost::function:
>
> #include
> void f(boost::function f) {}
> void g();
> int main()
> {
> f(g); // ERROR HERE
>
> return 0;
> }
>
> Here the error is:
>
> Invalid arguments Candidates are: void f(boost::function)
>
> 3. This is a very minor thing, but the parser warns about main()
> not returning a value:
>
> int main()
> {
> }
>
> "No return, in function returning non-void"
>
> Since the standard explicitly allows main to not return anything
> (and construes it as returning 0 implicitly), you may want to add
> a special case for this.
>
> I'd be happy to file bug reports for these cases if you'd like me to,
> as well to continue pointing out other issues with the parser
> as I come across them.
>
> Cheers,
> Nate.
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev