multiple unsequenced modifications

558 views
Skip to first unread message

Ben Goodrich

unread,
Apr 16, 2013, 7:13:53 PM4/16/13
to stan...@googlegroups.com
Clang 3.3 is about to branch, and for some reason has already displaced 3.2 on my laptop. Test-unit looks fine except for these new warnings in gm/

In file included from src/stan/gm/grammars/statement_grammar_inst.cpp:1:
src
/stan/gm/grammars/statement_grammar_def.hpp:388:13: warning: multiple unsequenced modifications to '_pass' [-Wunsequenced]
           
= validate_assignment_f(_1,_r2,boost::phoenix::ref(var_map_),
           
^
src
/stan/gm/grammars/statement_grammar_def.hpp:464:16: warning: multiple unsequenced modifications to '_pass' [-Wunsequenced]
       
[_pass = validate_int_expr2_f(_1,boost::phoenix::ref(error_msgs_))]
               
^
In file included from src/stan/gm/grammars/var_decls_grammar_inst.cpp:1:
src
/stan/gm/grammars/var_decls_grammar_def.hpp:568:19: warning: multiple unsequenced modifications to '_val' [-Wunsequenced]
           
[_val = add_var_f(_1,boost::phoenix::ref(var_map_),_a,_r2,
                 
^
src
/stan/gm/grammars/var_decls_grammar_def.hpp:656:18: warning: multiple unsequenced modifications to '_pass' [-Wunsequenced]
         
[_pass = validate_int_expr_f(_1,boost::phoenix::ref(error_msgs_))]
                 
^
src
/stan/gm/grammars/var_decls_grammar_def.hpp:753:23: warning: multiple unsequenced modifications to '_pass' [-Wunsequenced]
             
[ _pass = set_int_range_lower_f(_val,_1,
                     
^
src
/stan/gm/grammars/var_decls_grammar_def.hpp:777:23: warning: multiple unsequenced modifications to '_pass' [-Wunsequenced]
             
[ _pass = set_double_range_lower_f(_val,_1,
                     
^
src
/stan/gm/grammars/var_decls_grammar_def.hpp:810:16: warning: multiple unsequenced modifications to '_pass' [-Wunsequenced]
       
[_pass = validate_int_expr_f(_1,boost::phoenix::ref(error_msgs_))]
               
^
In file included from src/stan/gm/grammars/term_grammar_inst.cpp:1:
src
/stan/gm/grammars/term_grammar_def.hpp:435:38: warning: multiple unsequenced modifications to '_val' [-Wunsequenced]
                               
[_val = multiplication(_val,_1,
                                     
^
src
/stan/gm/grammars/term_grammar_def.hpp:455:29: warning: multiple unsequenced modifications to '_val' [-Wunsequenced]
                     
[_val = negate_expr_f(_1,boost::phoenix::ref(error_msgs_))]
                           
^
src
/stan/gm/grammars/term_grammar_def.hpp:467:22: warning: multiple unsequenced modifications to '_val' [-Wunsequenced]
               
[_val = add_expression_dimss_f(_val, _1, _pass,
                     
^
src
/stan/gm/grammars/term_grammar_def.hpp:480:37: warning: multiple unsequenced modifications to '_val' [-Wunsequenced]
       
| fun_r(_r1)          [_val = set_fun_type_named_f(_1,_r1,_pass,boost::phoenix::ref(error_msgs_))]
                                   
^
In file included from src/stan/gm/grammars/statement_2_grammar_inst.cpp:1:
src
/stan/gm/grammars/statement_2_grammar_def.hpp:120:18: warning: multiple unsequenced modifications to '_pass' [-Wunsequenced]
         
[_pass = add_conditional_condition_f(_val,_1,
                 
^

Not sure to what extent this is an actual problem, but I think it has to do with

http://en.wikipedia.org/wiki/Sequence_point

Ben

Ben Goodrich

unread,
Apr 16, 2013, 9:09:42 PM4/16/13
to stan...@googlegroups.com
On Tuesday, April 16, 2013 7:13:53 PM UTC-4, Ben Goodrich wrote:
Clang 3.3 is about to branch, and for some reason has already displaced 3.2 on my laptop. Test-unit looks fine

Upon further review (i.e. with test-models), clang++-3.3 balks on a vexing parse

goodrich@CYBERPOWERPC:/opt/stan$ make -j1 CC=clang++ O=3 test/models/speed/logistic/logistic
clang
++ -I src -I lib/eigen_3.1.2 -I lib/boost_1.53.0 -Wall -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -B/usr/lib/x86_64-linux-gnu -Wno-unused-function -Wno-uninitialized   -c -O3 -DGTEST_HAS_PTHREAD=0 -I lib/gtest_1.6.0/include -I lib/gtest_1.6.0 lib/gtest_1.6.0/src/gtest-all.cc -o test/gtest.o
In file included from lib/gtest_1.6.0/src/gtest-all.cc:42:
In file included from lib/gtest_1.6.0/src/gtest.cc:132:
lib
/gtest_1.6.0/src/gtest-internal-inl.h:206:8: warning: private field 'pretty_' is not used [-Wunused-private-field]
 
bool pretty_;
       
^
1 warning generated.
ar rv test
/libgtest.a test/gtest.o
ar
: creating test/libgtest.a
a
- test/gtest.o
clang
++ -I src -I lib/eigen_3.1.2 -I lib/boost_1.53.0 -Wall -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -B/usr/lib/x86_64-linux-gnu -Wno-unused-function -Wno-uninitialized   -c -O3 -DGTEST_HAS_PTHREAD=0 -I lib/gtest_1.6.0/include -I lib/gtest_1.6.0 src/test/models/speed/logistic/logistic_test.cpp -o test/models/speed/logistic/logistic.o
src
/test/models/speed/logistic/logistic_test.cpp:208:33: error: unknown type name 'param_ifstream'
    stan
::io::dump param_values(param_ifstream);
                               
^
src
/test/models/speed/logistic/logistic_test.cpp:208:32: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]
    stan
::io::dump param_values(param_ifstream);
                               
^~~~~~~~~~~~~~~~
src
/test/models/speed/logistic/logistic_test.cpp:208:33: note: add a pair of parentheses to declare a variable
    stan
::io::dump param_values(param_ifstream);
                               
^
                               
(              )
src
/test/models/speed/logistic/logistic_test.cpp:353:10: warning: unused variable 'time' [-Wunused-variable]
   
long time = 0;
         
^
2 warnings and 1 error generated.
make
: *** [test/models/speed/logistic/logistic.o] Error 1


Ben

Daniel Lee

unread,
Apr 16, 2013, 9:28:02 PM4/16/13
to stan...@googlegroups.com
Sorry -- that isn't a most vexing parse issue. That's an issue I introduced by trying to fix the stream str().c_str() issue.

I've fixed it and pushed.


--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages