#243: Missing user-provided default constructor ----------------------+----------------------------------------------------- Reporter: levill_r | Owner: Olena Team Type: defect | Status: new Priority: major | Milestone: Component: Milena | Version: 1.0 Keywords: | ----------------------+----------------------------------------------------- Compilation problem with Clang (LLVM), reported by Fabien Freling:
* https://www.lrde.epita.fr/pipermail/olena-bugs/2011-April/000146.html
#243: Missing user-provided default constructor ----------------------+----------------------------------------------------- Reporter: levill_r | Owner: Olena Team Type: defect | Status: new Priority: major | Milestone: Component: Milena | Version: 1.0 Keywords: | ----------------------+-----------------------------------------------------
Comment(by lazzara):
Fixed in branch 'llvm-support'.
Should be merged in branch 'next'.
#243: Missing user-provided default constructor ----------------------+----------------------------------------------------- Reporter: levill_r | Owner: Olena Team Type: defect | Status: new Priority: major | Milestone: Component: Milena | Version: 1.0 Keywords: | ----------------------+-----------------------------------------------------
Comment(by lazzara):
This problem is also encountered with some version of g++ (4.6.1 for instance). This is not a bug. g++ did not conformed to the standard and they are fixing it.
See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44499
#243: Missing user-provided default constructor ----------------------+----------------------------------------------------- Reporter: levill_r | Owner: lazzara Type: defect | Status: new Priority: major | Milestone: Component: Milena | Version: 1.0 Keywords: | ----------------------+----------------------------------------------------- Changes (by lazzara):
* owner: Olena Team => lazzara
Comment:
GCC 4.6.2 changelog :
In 4.6.0 and 4.6.1 G++ no longer allows objects of const-qualified type to be default initialized unless the type has a user-declared default constructor. In 4.6.2 G++ implements the proposed resolution of DR 253 (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#253), so default initialization is allowed if it initializes all subobjects. Code that fails to compile can be fixed by providing an initializer e.g. struct A { A(); }; struct B : A { int i; }; const B b = B(); Use -fpermissive to allow the old, non-conforming behaviour.
#243: Missing user-provided default constructor -----------------------+---------------------------------------------------- Reporter: levill_r | Owner: lazzara Type: defect | Status: closed Priority: major | Milestone: Component: Milena | Version: 1.0 Resolution: fixed | Keywords: -----------------------+---------------------------------------------------- Changes (by lazzara):
* status: new => closed * resolution: => fixed
Comment:
The following patches fix this issue: - 2af40042f361fe4b3fd281354e5e961ab3569730 - 93ca680bd5b2d8e1291f4a542c24548828e92e7c
They have been integrated into the 'next' branch.
It has been decided to implement the default constructor instead of explicitly instantiate objects.
Thanks to theses patches, Olena should compile with gcc 4.6.0 and 4.6.1. It also reduces the number of errors while compiling with Clang++.