Current status of X3?

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Current status of X3?

Mike Gresens
Hi,

what is the current status of X3?
How much is done?
Is it ready enough to start with porting of own projects from previous versions of spirit?
Is there a place where somebody can look for the current status (what's done, what's missing, test results, etc.)?
Is there documentation like in previous versions of spirit?

Best regard,
Mike...
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

Joel de Guzman
On 9/6/14, 5:24 PM, Mike Gresens wrote:
> Hi,
>
> what is the current status of X3?
> How much is done?
> Is it ready enough to start with porting of own projects from previous
> versions of spirit?
> Is there a place where somebody can look for the current status (what's
> done, what's missing, test results, etc.)?
> Is there documentation like in previous versions of spirit?

It's quite useful right now, but only for conforming C++14 compilers.
Sorry, no docs for now, but if you know Qi, then just follow the
X3 examples and you should be fine.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

Mike Gresens
In reply to this post by Mike Gresens
Do you have exact requirements?
Compiler? Version? Flags? Defines?

Is g++-4.8 -std=c++1y ok?
Or clang-3.5 -std=c++1y -stdlib=libc++?
Or clang-3.5 -std=c++1y -stdlib=libstdc++?

Can't compile any example on Ubuntu 14.04 with these compilers.

bjam -d2 release -j4
...patience...
...found 244 targets...
...updating 2 targets...
clang-linux.compile.c++.without-pth bin/clang-linux-3.5/release/source/calc1.o

  "clang++" -c -x c++ -std=c++1y -stdlib=libc++ -mssse3 -O3 -finline-functions -Wno-inline -Wall -fPIC -std=c++1y -stdlib=libc++ -DNDEBUG -I"/home/mike_gresens/octopus-prime/spirit_x3/include" -o "bin/clang-linux-3.5/release/source/calc1.o" "source/calc1.cpp"

source/calc1.cpp:66:9: error: unknown type name 'BOOST_PP_IIF_0'
        BOOST_SPIRIT_DEFINE(
        ^
/home/mike_gresens/octopus-prime/spirit_x3/include/boost/spirit/home/x3/nonterminal/rule.hpp:172:34: note: expanded from macro 'BOOST_SPIRIT_DEFINE'
#define BOOST_SPIRIT_DEFINE(...) BOOST_PP_SEQ_FOR_EACH(                         \
                                 ^
/usr/include/boost/preprocessor/seq/for_each.hpp:26:53: note: expanded from macro 'BOOST_PP_SEQ_FOR_EACH'
#    define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
                                                    ^
/usr/include/boost/preprocessor/repetition/for.hpp:27:23: note: expanded from macro 'BOOST_PP_FOR'
# define BOOST_PP_FOR BOOST_PP_CAT(BOOST_PP_FOR_, BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256))
                      ^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/usr/include/boost/preprocessor/control/iif.hpp:18:37: note: expanded from macro 'BOOST_PP_IIF'
#    define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_I(bit, t, f)
                                    ^
/usr/include/boost/preprocessor/control/iif.hpp:25:39: note: expanded from macro 'BOOST_PP_IIF_I'
#    define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_ ## bit(t, f)
                                      ^
<scratch space>:44:1: note: expanded from here
BOOST_PP_IIF_0
^
source/calc1.cpp:66:9: error: expected ';' after top level declarator
/home/mike_gresens/octopus-prime/spirit_x3/include/boost/spirit/home/x3/nonterminal/rule.hpp:172:34: note: expanded from macro 'BOOST_SPIRIT_DEFINE'
#define BOOST_SPIRIT_DEFINE(...) BOOST_PP_SEQ_FOR_EACH(                         \
                                 ^
/usr/include/boost/preprocessor/seq/for_each.hpp:26:84: note: expanded from macro 'BOOST_PP_SEQ_FOR_EACH'
#    define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
                                                                                   ^
/usr/include/boost/preprocessor/repetition/detail/for.hpp:22:73: note: expanded from macro 'BOOST_PP_FOR_1'
# define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_FOR_1_C(BOOST_PP_BOOL(p(2, s)), s, p, o, m)
                                                                        ^
note: (skipping 12 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/usr/include/boost/preprocessor/repetition/detail/for.hpp:279:55: note: expanded from macro 'BOOST_PP_FOR_1_C'
# define BOOST_PP_FOR_1_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IIF(c, BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(2, s), p, o, m)
                                                      ^
/usr/include/boost/preprocessor/control/iif.hpp:18:52: note: expanded from macro 'BOOST_PP_IIF'
#    define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_I(bit, t, f)
                                                   ^
/usr/include/boost/preprocessor/control/iif.hpp:25:56: note: expanded from macro 'BOOST_PP_IIF_I'
#    define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_ ## bit(t, f)
                                                       ^
In file included from source/calc1.cpp:20:
In file included from /home/mike_gresens/octopus-prime/spirit_x3/include/boost/spirit/home/x3.hpp:20:
In file included from /home/mike_gresens/octopus-prime/spirit_x3/include/boost/spirit/home/x3/nonterminal.hpp:14:
/home/mike_gresens/octopus-prime/spirit_x3/include/boost/spirit/home/x3/nonterminal/rule.hpp:39:9: error: static_assert failed "BOOST_SPIRIT_DEFINE undefined for this rule."
        static_assert(!is_same<decltype(get<ID>(context)), unused_type>::value,
        ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mike_gresens/octopus-prime/spirit_x3/include/boost/spirit/home/x3/nonterminal/rule.hpp:119:20: note: in instantiation of function template specialization 'boost::spirit::x3::parse_rule<client::calculator_grammar::expression, boost::spirit::x3::unused_type, std::__1::__wrap_iter<const char *>, boost::spirit::x3::context<boost::spirit::x3::skipper_tag, const boost::spirit::x3::char_class<boost::spirit::char_encoding::ascii, boost::spirit::x3::space_tag>, boost::spirit::x3::unused_type>, const boost::spirit::x3::unused_type>' requested here
            return parse_rule(*this, first, last, context, attr);
                   ^
/home/mike_gresens/octopus-prime/spirit_x3/include/boost/spirit/home/x3/core/parse.hpp:118:31: note: in instantiation of function template specialization 'boost::spirit::x3::rule<client::calculator_grammar::expression, boost::spirit::x3::unused_type>::parse<std::__1::__wrap_iter<const char *>, boost::spirit::x3::context<boost::spirit::x3::skipper_tag, const boost::spirit::x3::char_class<boost::spirit::char_encoding::ascii, boost::spirit::x3::space_tag>, boost::spirit::x3::unused_type>, const boost::spirit::x3::unused_type>' requested here
        bool r = as_parser(p).parse(first, last, skipper_ctx, unused, attr);
                              ^
/home/mike_gresens/octopus-prime/spirit_x3/include/boost/spirit/home/x3/core/parse.hpp:163:16: note: in instantiation of function template specialization 'boost::spirit::x3::phrase_parse_main<std::__1::__wrap_iter<const char *>, boost::spirit::x3::rule<client::calculator_grammar::expression, boost::spirit::x3::unused_type>, boost::spirit::x3::char_class<boost::spirit::char_encoding::ascii, boost::spirit::x3::space_tag>, const boost::spirit::x3::unused_type>' requested here
        return phrase_parse_main(first, last, p, s, unused, post_skip);
               ^
source/calc1.cpp:103:18: note: in instantiation of function template specialization 'boost::spirit::x3::phrase_parse<std::__1::__wrap_iter<const char *>, boost::spirit::x3::rule<client::calculator_grammar::expression, boost::spirit::x3::unused_type>, boost::spirit::x3::char_class<boost::spirit::char_encoding::ascii, boost::spirit::x3::space_tag> >' requested here
        bool r = phrase_parse(iter, end, calc, space);
                 ^
In file included from source/calc1.cpp:20:
In file included from /home/mike_gresens/octopus-prime/spirit_x3/include/boost/spirit/home/x3.hpp:20:
In file included from /home/mike_gresens/octopus-prime/spirit_x3/include/boost/spirit/home/x3/nonterminal.hpp:14:
/home/mike_gresens/octopus-prime/spirit_x3/include/boost/spirit/home/x3/nonterminal/rule.hpp:41:33: error: no member named 'parse' in 'boost::spirit::x3::unused_type'
        return get<ID>(context).parse(first, last, context, unused, attr);
               ~~~~~~~~~~~~~~~~ ^
4 errors generated.
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

Joel de Guzman
On 9/7/14, 7:41 AM, Mike Gresens wrote:
> Do you have exact requirements?
> Compiler? Version? Flags? Defines?
>
> Is g++-4.8 -std=c++1y ok?
> Or clang-3.5 -std=c++1y -stdlib=libc++?
> Or clang-3.5 -std=c++1y -stdlib=libstdc++?
>
> Can't compile any example on Ubuntu 14.04 with these compilers.

Odd! I'll see if I can check later today.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

Philboyd Studge
Gcc, all versions (throught 4.9.1) will not compile x3 due to at least one bug handling decltype in template function declarations. I've filed bug #63198 against gcc.

On Sat, Sep 6, 2014 at 5:07 PM, Joel de Guzman <[hidden email]> wrote:
On 9/7/14, 7:41 AM, Mike Gresens wrote:
> Do you have exact requirements?
> Compiler? Version? Flags? Defines?
>
> Is g++-4.8 -std=c++1y ok?
> Or clang-3.5 -std=c++1y -stdlib=libc++?
> Or clang-3.5 -std=c++1y -stdlib=libstdc++?
>
> Can't compile any example on Ubuntu 14.04 with these compilers.

Odd! I'll see if I can check later today.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

Aaron Graham-2

On Sun, Sep 7, 2014 at 8:38 AM, Philboyd Studge <[hidden email]> wrote:
Gcc, all versions (throught 4.9.1) will not compile x3 due to at least one bug handling decltype in template function declarations. I've filed bug #63198 against gcc.

Does anyone know of a workaround for this problem (other than "install clang")?
 

On Sat, Sep 6, 2014 at 5:07 PM, Joel de Guzman <[hidden email]> wrote:
On 9/7/14, 7:41 AM, Mike Gresens wrote:
> Do you have exact requirements?
> Compiler? Version? Flags? Defines?
>
> Is g++-4.8 -std=c++1y ok?
> Or clang-3.5 -std=c++1y -stdlib=libc++?
> Or clang-3.5 -std=c++1y -stdlib=libstdc++?
>
> Can't compile any example on Ubuntu 14.04 with these compilers.

Odd! I'll see if I can check later today.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general



------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

Aaron Graham-2
In reply to this post by Philboyd Studge
The bug is currently filed as P3 "normal". Looks like gcc isn't going to be supporting x3 for some time.

I might take a stab at fixing it if I get a chance in the next few months.


On Sun, Sep 7, 2014 at 8:38 AM, Philboyd Studge <[hidden email]> wrote:
Gcc, all versions (throught 4.9.1) will not compile x3 due to at least one bug handling decltype in template function declarations. I've filed bug #63198 against gcc.

On Sat, Sep 6, 2014 at 5:07 PM, Joel de Guzman <[hidden email]> wrote:
On 9/7/14, 7:41 AM, Mike Gresens wrote:
> Do you have exact requirements?
> Compiler? Version? Flags? Defines?
>
> Is g++-4.8 -std=c++1y ok?
> Or clang-3.5 -std=c++1y -stdlib=libc++?
> Or clang-3.5 -std=c++1y -stdlib=libstdc++?
>
> Can't compile any example on Ubuntu 14.04 with these compilers.

Odd! I'll see if I can check later today.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general



------------------------------------------------------------------------------

_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

Philboyd Studge
I've been working on the bug myself in my spare time. I have a provisional fix, but with it installed another bug (for which I'm distilling a test case before filing it) appears. It appears that x3 is putting pressure on new language features that are not fully/correctly implemented yet in gcc. In short, x3 vs. gcc is a bug bonanza!

On Thu, Oct 30, 2014 at 9:41 AM, Aaron Graham <[hidden email]> wrote:
The bug is currently filed as P3 "normal". Looks like gcc isn't going to be supporting x3 for some time.

I might take a stab at fixing it if I get a chance in the next few months.


On Sun, Sep 7, 2014 at 8:38 AM, Philboyd Studge <[hidden email]> wrote:
Gcc, all versions (throught 4.9.1) will not compile x3 due to at least one bug handling decltype in template function declarations. I've filed bug #63198 against gcc.

On Sat, Sep 6, 2014 at 5:07 PM, Joel de Guzman <[hidden email]> wrote:
On 9/7/14, 7:41 AM, Mike Gresens wrote:
> Do you have exact requirements?
> Compiler? Version? Flags? Defines?
>
> Is g++-4.8 -std=c++1y ok?
> Or clang-3.5 -std=c++1y -stdlib=libc++?
> Or clang-3.5 -std=c++1y -stdlib=libstdc++?
>
> Can't compile any example on Ubuntu 14.04 with these compilers.

Odd! I'll see if I can check later today.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general



------------------------------------------------------------------------------

_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general



------------------------------------------------------------------------------

_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

Matt Calabrese
In reply to this post by Philboyd Studge

Not at a computer, but looking at 63198 it seems like a simple workaround would be to assign the result of the decltype to a default function template argument and the refer to that from the function parameter list. Haven't tested but I imagine it would work.

On Sep 7, 2014 8:41 AM, "Philboyd Studge" <[hidden email]> wrote:
Gcc, all versions (throught 4.9.1) will not compile x3 due to at least one bug handling decltype in template function declarations. I've filed bug #63198 against gcc.

On Sat, Sep 6, 2014 at 5:07 PM, Joel de Guzman <[hidden email]> wrote:
On 9/7/14, 7:41 AM, Mike Gresens wrote:
> Do you have exact requirements?
> Compiler? Version? Flags? Defines?
>
> Is g++-4.8 -std=c++1y ok?
> Or clang-3.5 -std=c++1y -stdlib=libc++?
> Or clang-3.5 -std=c++1y -stdlib=libstdc++?
>
> Can't compile any example on Ubuntu 14.04 with these compilers.

Odd! I'll see if I can check later today.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general


------------------------------------------------------------------------------

_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

Joel de Guzman
On 11/3/14, 3:23 AM, Matt Calabrese wrote:
> Not at a computer, but looking at 63198 it seems like a simple workaround would be to
> assign the result of the decltype to a default function template argument and the refer to
> that from the function parameter list. Haven't tested but I imagine it would work.
>
A patch/PR would be awesome, Matt, or anyone :)

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

Philboyd Studge
I've updated the gcc bug report with a description of how the bug occurs. (By the way, we Spirits may get more traction with the gcc project by cc'ing the bug report.) Here is a patch I made (fits the 4.9.2 release) . I am not by any means a gcc expert, so any input would be very welcome.

blackice:decltype-bug rabeles$ diff ~/github/gcc/gcc/cp/parser.c parser.c
19176c19176,19177
<       if (cp_lexer_next_token_is (parser->lexer, CPP_SCOPE))
---
>        if (cp_lexer_next_token_is (parser->lexer, CPP_SCOPE)
>                || (parser->scope && TREE_CODE(parser->scope) == DECLTYPE_TYPE))

Please note that this patch is not entirely correct. Specifically, it does not handle cases like 'decltype(y = y)::t1::t2' where multiple scope operators appear. It does pass gcc regression tests.


On Sun, Nov 2, 2014 at 12:38 PM, Joel de Guzman <[hidden email]> wrote:
On 11/3/14, 3:23 AM, Matt Calabrese wrote:
> Not at a computer, but looking at 63198 it seems like a simple workaround would be to
> assign the result of the decltype to a default function template argument and the refer to
> that from the function parameter list. Haven't tested but I imagine it would work.
>
A patch/PR would be awesome, Matt, or anyone :)

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general


------------------------------------------------------------------------------

_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

teajay-2
On 11/03/2014 03:56 PM, Philboyd Studge wrote:

> I've updated the gcc bug report with a description of how the bug occurs.
> (By the way, we Spirits may get more traction with the gcc project by
> cc'ing the bug report.) Here is a patch I made (fits the 4.9.2 release) . I
> am not by any means a gcc expert, so any input would be very welcome.
>
> blackice:decltype-bug rabeles$ diff ~/github/gcc/gcc/cp/parser.c parser.c
> 19176c19176,19177
> <       if (cp_lexer_next_token_is (parser->lexer, CPP_SCOPE))
> ---
>>        if (cp_lexer_next_token_is (parser->lexer, CPP_SCOPE)
>>                || (parser->scope && TREE_CODE(parser->scope) ==
> DECLTYPE_TYPE))
>
> Please note that this patch is not entirely correct. Specifically, it does
> not handle cases like 'decltype(y = y)::t1::t2' where multiple scope
> operators appear. It does pass gcc regression tests.
>
>
> On Sun, Nov 2, 2014 at 12:38 PM, Joel de Guzman <[hidden email]> wrote:
>
>> On 11/3/14, 3:23 AM, Matt Calabrese wrote:
>>> Not at a computer, but looking at 63198 it seems like a simple
>> workaround would be to
>>> assign the result of the decltype to a default function template
>> argument and the refer to
>>> that from the function parameter list. Haven't tested but I imagine it
>> would work.
>>>
>> A patch/PR would be awesome, Matt, or anyone :)
>>
>> Regards,
>> --
>> Joel de Guzman

I've just compiled all the spirit x3 test cases from the develop branch
successfully with gcc 4.9.1 on my box. Could you provide some evidence
of what is failing ?

Regards,

Thomas Bernard



------------------------------------------------------------------------------
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

Philboyd Studge
I can readily reproduce the bug using the 'develop' branch (pulled today), the Boost 1.57 distribution, and an unmodified gcc 4.9.1 or 4.9.2. Attempting to compile example/x3/calc1.cpp from the command line:

blackice:x3 rabeles$ g++ --version
g++ (GCC) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

blackice:x3 rabeles$ g++ calc1.cpp -std=c++1y -DBOOST_PP_VARIADICS=1
In file included from /usr/local/include/boost/spirit/home/x3/nonterminal.hpp:14:0,
                 from /usr/local/include/boost/spirit/home/x3.hpp:20,
                 from calc1.cpp:20:
calc1.cpp:66:9: error: ‘client::calculator_grammar::parse_rule’ declared as an ‘inline’ variable
         BOOST_SPIRIT_DEFINE(
         ^
calc1.cpp:66:9: error: template declaration of ‘bool client::calculator_grammar::parse_rule’
calc1.cpp:66:9: error: expected ‘)’ before ‘rule_’
         BOOST_SPIRIT_DEFINE(
         ^
calc1.cpp:66:9: error: expected primary-expression before ‘&’ token
         BOOST_SPIRIT_DEFINE(
         ^
calc1.cpp:66:9: error: ‘first’ was not declared in this scope
         BOOST_SPIRIT_DEFINE(
         ^
calc1.cpp:66:9: note: suggested alternatives:
In file included from /usr/local/include/boost/variant/detail/initializer.hpp:31:0,
                 from /usr/local/include/boost/variant/variant.hpp:30,
                 from /usr/local/include/boost/variant.hpp:17,
                 from /usr/local/include/boost/spirit/home/x3/support/traits/is_variant.hpp:15,
                 from /usr/local/include/boost/spirit/home/x3/support/traits/attribute_category.hpp:21,
                 from /usr/local/include/boost/spirit/home/x3/support/traits/move_to.hpp:16,
                 from /usr/local/include/boost/spirit/home/x3/auxiliary/any_parser.hpp:21,
                 from /usr/local/include/boost/spirit/home/x3/auxiliary.hpp:15,
                 from /usr/local/include/boost/spirit/home/x3.hpp:16,
                 from calc1.cpp:20:
/usr/local/include/boost/mpl/pair.hpp:40:8: note:   ‘boost::mpl::first’
 struct first
        ^
... and so on. The gcc error messages are not especially useful.

Clang has no problem:

blackice:x3 rabeles$ clang++ --version
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
blackice:x3 rabeles$ clang++ calc1.cpp -std=c++1y -DBOOST_PP_VARIADICS=1


On Wed, Nov 5, 2014 at 3:42 PM, Thomas Bernard <[hidden email]> wrote:
On 11/03/2014 03:56 PM, Philboyd Studge wrote:
> I've updated the gcc bug report with a description of how the bug occurs.
> (By the way, we Spirits may get more traction with the gcc project by
> cc'ing the bug report.) Here is a patch I made (fits the 4.9.2 release) . I
> am not by any means a gcc expert, so any input would be very welcome.
>
> blackice:decltype-bug rabeles$ diff ~/github/gcc/gcc/cp/parser.c parser.c
> 19176c19176,19177
> <       if (cp_lexer_next_token_is (parser->lexer, CPP_SCOPE))
> ---
>>        if (cp_lexer_next_token_is (parser->lexer, CPP_SCOPE)
>>                || (parser->scope && TREE_CODE(parser->scope) ==
> DECLTYPE_TYPE))
>
> Please note that this patch is not entirely correct. Specifically, it does
> not handle cases like 'decltype(y = y)::t1::t2' where multiple scope
> operators appear. It does pass gcc regression tests.
>
>
> On Sun, Nov 2, 2014 at 12:38 PM, Joel de Guzman <[hidden email]> wrote:
>
>> On 11/3/14, 3:23 AM, Matt Calabrese wrote:
>>> Not at a computer, but looking at 63198 it seems like a simple
>> workaround would be to
>>> assign the result of the decltype to a default function template
>> argument and the refer to
>>> that from the function parameter list. Haven't tested but I imagine it
>> would work.
>>>
>> A patch/PR would be awesome, Matt, or anyone :)
>>
>> Regards,
>> --
>> Joel de Guzman

I've just compiled all the spirit x3 test cases from the develop branch
successfully with gcc 4.9.1 on my box. Could you provide some evidence
of what is failing ?

Regards,

Thomas Bernard



------------------------------------------------------------------------------
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general


------------------------------------------------------------------------------

_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

teajay-2
On 11/06/2014 04:06 PM, Philboyd Studge wrote:

> I can readily reproduce the bug using the 'develop' branch (pulled today),
> the Boost 1.57 distribution, and an unmodified gcc 4.9.1 or 4.9.2.
> Attempting to compile example/x3/calc1.cpp from the command line:
>
> blackice:x3 rabeles$ g++ --version
> g++ (GCC) 4.9.2
> Copyright (C) 2014 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> blackice:x3 rabeles$ g++ calc1.cpp -std=c++1y -DBOOST_PP_VARIADICS=1
> In file included from
> /usr/local/include/boost/spirit/home/x3/nonterminal.hpp:14:0,
>                  from /usr/local/include/boost/spirit/home/x3.hpp:20,
>                  from calc1.cpp:20:
> calc1.cpp:66:9: error: ‘client::calculator_grammar::parse_rule’ declared as
> an ‘inline’ variable
>          BOOST_SPIRIT_DEFINE(
>          ^
> calc1.cpp:66:9: error: template declaration of ‘bool
> client::calculator_grammar::parse_rule’
> calc1.cpp:66:9: error: expected ‘)’ before ‘rule_’
>          BOOST_SPIRIT_DEFINE(
>          ^
> calc1.cpp:66:9: error: expected primary-expression before ‘&’ token
>          BOOST_SPIRIT_DEFINE(
>          ^
> calc1.cpp:66:9: error: ‘first’ was not declared in this scope
>          BOOST_SPIRIT_DEFINE(
>          ^
> calc1.cpp:66:9: note: suggested alternatives:
> In file included from
> /usr/local/include/boost/variant/detail/initializer.hpp:31:0,
>                  from /usr/local/include/boost/variant/variant.hpp:30,
>                  from /usr/local/include/boost/variant.hpp:17,
>                  from
> /usr/local/include/boost/spirit/home/x3/support/traits/is_variant.hpp:15,
>                  from
> /usr/local/include/boost/spirit/home/x3/support/traits/attribute_category.hpp:21,
>                  from
> /usr/local/include/boost/spirit/home/x3/support/traits/move_to.hpp:16,
>                  from
> /usr/local/include/boost/spirit/home/x3/auxiliary/any_parser.hpp:21,
>                  from
> /usr/local/include/boost/spirit/home/x3/auxiliary.hpp:15,
>                  from /usr/local/include/boost/spirit/home/x3.hpp:16,
>                  from calc1.cpp:20:
> /usr/local/include/boost/mpl/pair.hpp:40:8: note:   ‘boost::mpl::first’
>  struct first
>         ^
> ... and so on. The gcc error messages are not especially useful.
>
> Clang has no problem:
>
> blackice:x3 rabeles$ clang++ --version
> Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
> Target: x86_64-apple-darwin13.4.0
> Thread model: posix
> blackice:x3 rabeles$ clang++ calc1.cpp -std=c++1y -DBOOST_PP_VARIADICS=1
>
>


I'll have a look at it this evening.

Regards,

Thomas Bernard



------------------------------------------------------------------------------
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Current status of X3?

teajay-2
On 11/06/2014 05:56 PM, Thomas Bernard wrote:

> On 11/06/2014 04:06 PM, Philboyd Studge wrote:
>> I can readily reproduce the bug using the 'develop' branch (pulled today),
>> the Boost 1.57 distribution, and an unmodified gcc 4.9.1 or 4.9.2.
>> Attempting to compile example/x3/calc1.cpp from the command line:
>>
>> blackice:x3 rabeles$ g++ --version
>> g++ (GCC) 4.9.2
>> Copyright (C) 2014 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>
>> blackice:x3 rabeles$ g++ calc1.cpp -std=c++1y -DBOOST_PP_VARIADICS=1
>> In file included from
>> /usr/local/include/boost/spirit/home/x3/nonterminal.hpp:14:0,
>>                  from /usr/local/include/boost/spirit/home/x3.hpp:20,
>>                  from calc1.cpp:20:
>> calc1.cpp:66:9: error: ‘client::calculator_grammar::parse_rule’ declared as
>> an ‘inline’ variable
>>          BOOST_SPIRIT_DEFINE(
>>          ^
>> calc1.cpp:66:9: error: template declaration of ‘bool
>> client::calculator_grammar::parse_rule’
>> calc1.cpp:66:9: error: expected ‘)’ before ‘rule_’
>>          BOOST_SPIRIT_DEFINE(
>>          ^
>> calc1.cpp:66:9: error: expected primary-expression before ‘&’ token
>>          BOOST_SPIRIT_DEFINE(
>>          ^
>> calc1.cpp:66:9: error: ‘first’ was not declared in this scope
>>          BOOST_SPIRIT_DEFINE(
>>          ^
>> calc1.cpp:66:9: note: suggested alternatives:
>> In file included from
>> /usr/local/include/boost/variant/detail/initializer.hpp:31:0,
>>                  from /usr/local/include/boost/variant/variant.hpp:30,
>>                  from /usr/local/include/boost/variant.hpp:17,
>>                  from
>> /usr/local/include/boost/spirit/home/x3/support/traits/is_variant.hpp:15,
>>                  from
>> /usr/local/include/boost/spirit/home/x3/support/traits/attribute_category.hpp:21,
>>                  from
>> /usr/local/include/boost/spirit/home/x3/support/traits/move_to.hpp:16,
>>                  from
>> /usr/local/include/boost/spirit/home/x3/auxiliary/any_parser.hpp:21,
>>                  from
>> /usr/local/include/boost/spirit/home/x3/auxiliary.hpp:15,
>>                  from /usr/local/include/boost/spirit/home/x3.hpp:16,
>>                  from calc1.cpp:20:
>> /usr/local/include/boost/mpl/pair.hpp:40:8: note:   ‘boost::mpl::first’
>>  struct first
>>         ^
>> ... and so on. The gcc error messages are not especially useful.
>>
>> Clang has no problem:
>>
>> blackice:x3 rabeles$ clang++ --version
>> Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
>> Target: x86_64-apple-darwin13.4.0
>> Thread model: posix
>> blackice:x3 rabeles$ clang++ calc1.cpp -std=c++1y -DBOOST_PP_VARIADICS=1
>>
>>
>
>
> I'll have a look at it this evening.
>
> Regards,
>
> Thomas Bernard
>

A workaround is on the way ....



------------------------------------------------------------------------------
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general