[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison 3.0.3 (stable)
From: |
Akim Demaille |
Subject: |
Re: Bison 3.0.3 (stable) |
Date: |
Mon, 19 Jan 2015 18:34:25 +0100 |
> Le 19 janv. 2015 à 16:10, Thomas Jahns <address@hidden> a écrit :
>
>> make check TESTSUITEFLAGS='-d -v -x 95'
>>
>
> That does unfortunately only give
>
> stdout:
> /sw/src/bison/bison-3.0.3/tests/output.at:264: $CC $CFLAGS $CPPFLAGS -c -o
> glr.o -c "address@hidden&*()-=_+{}[]|\\:;<>, .'.c"
> Not enabling shell tracing (command contains a `...` command substitution)
>
> :-(
Bummer...
You should be able to find CC, CFLAGS etc. in tests/atlocal.
>>>> For some reason, we have one more call to the destructor than expected.
>>>> Which
>>>> certainly means that one value was duplicated at some point, unexpectedly.
>>>> Maybe your compiler does not perform some common optimizations, such as
>>>> RVO and NRVO, possibly precisely because the destructor is nontrivial?
>>>
>>> I'm building without optimization. So that would be kind of the expected
>>> behaviour then?
>>
>> Maybe you could try with optimizations enabled, to see if it makes
>> any difference.
>
> Unfortunately switching to -O2 at least didn't make a difference either.
Good to know, thanks!
>>> I've run the program named "list" in 426 from gdb with the attached script.
>>> Please see the attached output for backtraces at (hopefully) the relevant
>>> places. Please don't hesitate if something else from the debugger would be
>>> useful.
>>
>> Thanks for the traces! I don't have time to try to understand them
>> now, I'll try to address that in the near future.
>
> So should I trace the constructors too?
If you want to, sure, that could help :)
I also realized that I overlooked your logs, there is also this:
> # -*- compilation -*-
> 440. c++.at:973: testing Exception safety with error recovery ...
> /sw/src/bison/bison-3.0.3/tests/c++.at:973: $BISON_CXX_WORKS
> stderr:
> stdout:
> /sw/src/bison/bison-3.0.3/tests/c++.at:973: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS
> -o exception exception.cc $LIBS
> stderr:
> stdout:
> /sw/src/bison/bison-3.0.3/tests/c++.at:973: ./exception || exit 77
> stderr:
> Inner caught
> Outer caught
> /sw/src/bison/bison-3.0.3/tests/c++.at:973: bison -fno-caret -o input.cc
> --report=all input.yy
> /sw/src/bison/bison-3.0.3/tests/c++.at:973: $BISON_CXX_WORKS
> stderr:
> stdout:
> /sw/src/bison/bison-3.0.3/tests/c++.at:973: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS
> -o input input.cc $LIBS
> stderr:
> "input.yy", line 54.24: 1540-0218 (S) The call does not match any parameter
> list for "erase".
> "/sw/ibm/xlC/11.1.0.17/usr/vacpp/include/xtree.t", line 166.31: 1540-1283 (I)
> "std::_Tree<std::_Tset_traits<const Object *,std::less<const Object
> *>,std::allocator<const Object *>,0> >::erase(iterator)" is not a viable
> candidate.
> "input.yy", line 54.32: 1540-0256 (I) A parameter of type
> "std::_Tree<std::_Tset_traits<const Object *,std::less<const Object
> *>,std::allocator<const Object *>,0> >::iterator" cannot be initialized with
> an expression of type "std::set<const Object *,std::less<const Object
> *>,std::allocator<const Object *> >::const_iterator".
> "/sw/ibm/xlC/11.1.0.17/usr/vacpp/include/xtree.t", line 285.31: 1540-1283 (I)
> "std::_Tree<std::_Tset_traits<const Object *,std::less<const Object
> *>,std::allocator<const Object *>,0> >::erase(iterator, iterator)" is not a
> viable candidate.
> "input.yy", line 54.32: 1540-0256 (I) A parameter of type
> "std::_Tree<std::_Tset_traits<const Object *,std::less<const Object
> *>,std::allocator<const Object *>,0> >::iterator" cannot be initialized with
> an expression of type "std::set<const Object *,std::less<const Object
> *>,std::allocator<const Object *> >::const_iterator".
> "/sw/ibm/xlC/11.1.0.17/usr/vacpp/include/xtree", line 366.19: 1540-1283 (I)
> "std::_Tree<std::_Tset_traits<const Object *,std::less<const Object
> *>,std::allocator<const Object *>,0> >::erase(const key_type &)" is not a
> viable candidate.
> "input.yy", line 54.32: 1540-0256 (I) A parameter of type "const Object *
> const &" cannot be initialized with an expression of type "std::set<const
> Object *,std::less<const Object *>,std::allocator<const Object *>
> >::const_iterator".
> "/sw/ibm/xlC/11.1.0.17/usr/vacpp/include/xtree", line 372.14: 1540-1283 (I)
> "std::_Tree<std::_Tset_traits<const Object *,std::less<const Object
> *>,std::allocator<const Object *>,0> >::erase(const key_type *, const
> key_type *)" is not a viable candidate.
> "input.yy", line 54.32: 1540-0256 (I) A parameter of type "const Object *
> const *" cannot be initialized with an expression of type "std::set<const
> Object *,std::less<const Object *>,std::allocator<const Object *>
> >::const_iterator".
The piece of code is:
~Object ()
{
log (this, "Object::~Object");
objects::const_iterator i = instances.find (this);
// Make sure this object is alive.
assert (i != instances.end ());
Object::instances.erase (i);
}
where
typedef std::set<const Object*> objects;
static objects instances;
so it seems that your libc++ does not like a const_iterator to be used
to erase. And it (the libc++) is right: this is valid C++11, but in
C++98 iterator was mandated.
Then:
> "input.yy", line 80.21: 1540-0218 (S) The call does not match any parameter
> list for "operator<<".
On:
std::cerr << msg << " {";
is probably because #include <string> is missing (well, it's done after).
Later we have Java failures:
> 463. javapush.at:311: testing Calc parser with api.push-pull both ...
> /sw/src/bison/bison-3.0.3/tests/javapush.at:579: bison -fno-caret
> -Dapi.push-pull=both -o Calc.java Calc.y
> /sw/src/bison/bison-3.0.3/tests/javapush.at:580: $SHELL ../../../javacomp.sh
> Calc.java
> stderr:
> Calc.java:1072: cannot resolve symbol
> symbol : class StringBuilder
> location: class Calc
> StringBuilder buf = new StringBuilder();
> ^
> Calc.java:1072: cannot resolve symbol
> symbol : class StringBuilder
> location: class Calc
> StringBuilder buf = new StringBuilder();
> ^
> 2 errors
> stdout:
> /sw/src/bison/bison-3.0.3/tests/javapush.at:580: exit code was 1, expected 0
> 463. javapush.at:311: 463. Calc parser with api.push-pull both
> (javapush.at:311): FAILED (javapush.at:580)
Well, I am no Java programmer, but it appears that StringBuilder is part
of java.lang, and the test starts with import java.io.*. So I guess
we need another import.
Could you please try this patch? It should address these failures.
Hopefully.
commit 697f8c41c56324ee7045e3e0a158d25e3b9a2506
Author: Akim Demaille <address@hidden>
Date: Mon Jan 19 18:24:24 2015 +0100
tests: fix C++/Java conformance
Reported by Thomas Jahns.
http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html
* tests/c++.at (Exception safety): Add missing include.
Don't use const_iterator for erase.
* tests/javapush.at (Trivial Push Parser with %initial-action): Add
missing import.
diff --git a/tests/c++.at b/tests/c++.at
index 737037d..062e5f0 100644
--- a/tests/c++.at
+++ b/tests/c++.at
@@ -719,6 +719,7 @@ $1
#include <cstdlib> // size_t and getenv.
#include <iostream>
#include <set>
+ #include <string>
bool debug = false;
@@ -751,7 +752,7 @@ $1
~Object ()
{
log (this, "Object::~Object");
- objects::const_iterator i = instances.find (this);
+ objects::iterator i = instances.find (this);
// Make sure this object is alive.
assert (i != instances.end ());
Object::instances.erase (i);
diff --git a/tests/javapush.at b/tests/javapush.at
index 28e6947..ca52b87 100644
--- a/tests/javapush.at
+++ b/tests/javapush.at
@@ -235,6 +235,7 @@ AT_CLEANUP
m4_define([AT_CALC_BODY],[
%code imports {
import java.io.*;
+ import java.lang.StringBuilder;
}
%code {
- Re: Bison 3.0.3 (stable), (continued)
- Message not available
- Re: Bison 3.0.3 (stable), Akim Demaille, 2015/01/18
- Re: Bison 3.0.3 (stable), Hans Aberg, 2015/01/18
- Re: Bison 3.0.3 (stable), Akim Demaille, 2015/01/18
- Re: Bison 3.0.3 (stable), Hans Aberg, 2015/01/18
- Re: Bison 3.0.3 (stable), John Horigan, 2015/01/18
- Re: Bison 3.0.3 (stable), Akim Demaille, 2015/01/19
Re: Bison 3.0.3 (stable), Thomas Jahns, 2015/01/19
- Message not available
- Re: Bison 3.0.3 (stable), Thomas Jahns, 2015/01/19
- Re: Bison 3.0.3 (stable), Akim Demaille, 2015/01/19
- Re: Bison 3.0.3 (stable), Thomas Jahns, 2015/01/19
- Re: Bison 3.0.3 (stable),
Akim Demaille <=
- Re: Bison 3.0.3 (stable), Thomas Jahns, 2015/01/20
- Re: Bison 3.0.3 (stable), Akim Demaille, 2015/01/20
- Re: Bison 3.0.3 (stable), Akim Demaille, 2015/01/20
Re: Bison 3.0.3 (stable), Akim Demaille, 2015/01/19
Re: Bison 3.0.3 (stable), Thomas Jahns, 2015/01/20
Re: Bison 3.0.3 (stable), Akim Demaille, 2015/01/20
Message not availableMessage not availableMessage not availableMessage not availableRe: Bison 3.0.3 (stable), Thomas Jahns, 2015/01/21
Re: Bison 3.0.3 (stable), Akim Demaille, 2015/01/21
Re: Bison 3.0.3 (stable), Thomas Jahns, 2015/01/22
Re: Bison 3.0.3 (stable), Akim Demaille, 2015/01/22