devwaker / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

auto keyword usage produces compiler errors #452

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Line 898 of src/compiler/ParseHelper.cpp uses the auto keyword introduced in 
C++11.  This causes an error in the Qt and EFL ports of WebKit, it does not 
seem to be necessary, and it is the only such error.  I suggest the type 
(std::map<std::string, TBehavior>::const_iterator)  be explicitly stated.

Original issue reported on code.google.com by achriste...@gmail.com on 23 Jul 2013 at 8:25

GoogleCodeExporter commented 9 years ago
Thanks. Out of curiosity, which compilers are you for the Qt and EFL ports that 
do not support auto with your current set of compile flags?

Original comment by jamie.ma...@transgaming.com on 23 Jul 2013 at 9:25

GoogleCodeExporter commented 9 years ago

Original comment by jamie.ma...@transgaming.com on 23 Jul 2013 at 9:27

GoogleCodeExporter commented 9 years ago
They're using gcc.  I've only seen that making this change fixes their 
buildbots.  I could go in and add -std=c++11 to their cflags, but since this is 
the only place that auto caused a problem, it might be worth removing the only 
use of auto and add compatibility for anyone who uses compilers that don't have 
c++11 with ANGLE.

Original comment by achriste...@gmail.com on 23 Jul 2013 at 9:39

GoogleCodeExporter commented 9 years ago
Would it be a challenging task to add std=c++11 to the list of build flags?

It is only a single usage of auto that you see in the master branch, however we 
have been using it more liberally in the es3proto branch.

GCC should be able to support auto since 4.4.

Original comment by jamie.ma...@transgaming.com on 23 Jul 2013 at 9:49

GoogleCodeExporter commented 9 years ago
If there are going to be many uses of auto I'll have to figure it out next time 
we update.  I just thought it would be nice to make ANGLE easy to include in 
projects that support pre-2011 compilers.

Original comment by achriste...@gmail.com on 23 Jul 2013 at 10:46

GoogleCodeExporter commented 9 years ago
Use of auto is being removed from ANGLE.

Original comment by shannonw...@chromium.org on 26 Jul 2013 at 8:25

GoogleCodeExporter commented 9 years ago

Original comment by shannonw...@chromium.org on 26 Jul 2013 at 8:25

GoogleCodeExporter commented 9 years ago
At 07dd3ea6

Original comment by apatr...@chromium.org on 26 Jul 2013 at 10:25