Re: Building with old gcc
On Tue, 9 Oct 2018 at 14:48, Paolo Carlini wrote: > > Hi, > > On 09/10/18 15:33, Jonathan Wakely wrote: > > On Tue, 9 Oct 2018 at 14:30, Paul Koning wrote: > >> I'm trying to build the current code on Linux with GCC 4.3.2 (stock > >> compiler in Fedora 10 which is my old test system). It fails like this: > >> > >> In file included from > >> /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/tree-data-ref.h:27, > >> from > >> /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/gimple-loop-interchange.cc:44: > >> /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h: In constructor > >> ‘opt_result::opt_result(bool, opt_problem*)’: > >> /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:217: error: class > >> ‘opt_result’ does not have any field named ‘opt_wrapper’ > >> /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:217: error: no > >> matching function for call to ‘opt_wrapper::opt_wrapper()’ > >> /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:160: note: > >> candidates are: opt_wrapper::opt_wrapper(T, opt_problem*) [with T = > >> bool] > >> /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:147: note: > >> opt_wrapper::opt_wrapper(const opt_wrapper&) > >> make[3]: *** [gimple-loop-interchange.o] Error 1 > >> > >> Is 9.0 supposed to build with a build compiler this old? > > Yes. > > > > GCC 4.3 doesn't define the injected-class-name for the base, so this > > patch is needed: > > > > --- a/gcc/opt-problem.h > > +++ b/gcc/opt-problem.h > > @@ -214,7 +214,7 @@ class opt_result : public opt_wrapper > > /* Private ctor. Instances should be created by the success and failure > >static member functions. */ > > opt_result (wrapped_t result, opt_problem *problem) > > - : opt_wrapper (result, problem) > > + : opt_wrapper (result, problem) > > {} > > }; > > At the end of August my colleague Jose Marchesi fixed another instance > of the same issue, affecting classes auto_edge_flag and auto_bb_flag. I > think we can commit this change too as obvious. Committed as obvious. commit a40f123115ad44525029a7abe5304b45c0a9d43d Author: Jonathan Wakely Date: Sat Oct 13 12:12:00 2018 +0100 Fix compilation failure with C++98 compilers * opt-problem.h (opt_wrapper): Use template-argument-list when naming the base class, because using the injected-class-name was not clearly specified until DR 176. diff --git a/gcc/opt-problem.h b/gcc/opt-problem.h index 68d7e4a5f7b..55d0ff024f7 100644 --- a/gcc/opt-problem.h +++ b/gcc/opt-problem.h @@ -214,7 +214,7 @@ class opt_result : public opt_wrapper /* Private ctor. Instances should be created by the success and failure static member functions. */ opt_result (wrapped_t result, opt_problem *problem) - : opt_wrapper (result, problem) + : opt_wrapper (result, problem) {} };
Re: Building with old gcc
Hi, On 09/10/18 15:33, Jonathan Wakely wrote: On Tue, 9 Oct 2018 at 14:30, Paul Koning wrote: I'm trying to build the current code on Linux with GCC 4.3.2 (stock compiler in Fedora 10 which is my old test system). It fails like this: In file included from /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/tree-data-ref.h:27, from /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/gimple-loop-interchange.cc:44: /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h: In constructor ‘opt_result::opt_result(bool, opt_problem*)’: /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:217: error: class ‘opt_result’ does not have any field named ‘opt_wrapper’ /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:217: error: no matching function for call to ‘opt_wrapper::opt_wrapper()’ /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:160: note: candidates are: opt_wrapper::opt_wrapper(T, opt_problem*) [with T = bool] /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:147: note: opt_wrapper::opt_wrapper(const opt_wrapper&) make[3]: *** [gimple-loop-interchange.o] Error 1 Is 9.0 supposed to build with a build compiler this old? Yes. GCC 4.3 doesn't define the injected-class-name for the base, so this patch is needed: --- a/gcc/opt-problem.h +++ b/gcc/opt-problem.h @@ -214,7 +214,7 @@ class opt_result : public opt_wrapper /* Private ctor. Instances should be created by the success and failure static member functions. */ opt_result (wrapped_t result, opt_problem *problem) - : opt_wrapper (result, problem) + : opt_wrapper (result, problem) {} }; At the end of August my colleague Jose Marchesi fixed another instance of the same issue, affecting classes auto_edge_flag and auto_bb_flag. I think we can commit this change too as obvious. Paolo.
Re: Building with old gcc
On Tue, Oct 9, 2018 at 3:33 PM Jonathan Wakely wrote: > > On Tue, 9 Oct 2018 at 14:30, Paul Koning wrote: > > > > I'm trying to build the current code on Linux with GCC 4.3.2 (stock > > compiler in Fedora 10 which is my old test system). It fails like this: > > > > In file included from > > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/tree-data-ref.h:27, > > from > > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/gimple-loop-interchange.cc:44: > > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h: In constructor > > ‘opt_result::opt_result(bool, opt_problem*)’: > > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:217: error: class > > ‘opt_result’ does not have any field named ‘opt_wrapper’ > > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:217: error: no > > matching function for call to ‘opt_wrapper::opt_wrapper()’ > > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:160: note: candidates > > are: opt_wrapper::opt_wrapper(T, opt_problem*) [with T = bool] > > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:147: note: > > opt_wrapper::opt_wrapper(const opt_wrapper&) > > make[3]: *** [gimple-loop-interchange.o] Error 1 > > > > Is 9.0 supposed to build with a build compiler this old? > > Yes. > > GCC 4.3 doesn't define the injected-class-name for the base, so this > patch is needed: OK. > --- a/gcc/opt-problem.h > +++ b/gcc/opt-problem.h > @@ -214,7 +214,7 @@ class opt_result : public opt_wrapper >/* Private ctor. Instances should be created by the success and failure > static member functions. */ >opt_result (wrapped_t result, opt_problem *problem) > - : opt_wrapper (result, problem) > + : opt_wrapper (result, problem) >{} > };
Re: Building with old gcc
On Tue, 9 Oct 2018 at 14:30, Paul Koning wrote: > > I'm trying to build the current code on Linux with GCC 4.3.2 (stock compiler > in Fedora 10 which is my old test system). It fails like this: > > In file included from > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/tree-data-ref.h:27, > from > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/gimple-loop-interchange.cc:44: > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h: In constructor > ‘opt_result::opt_result(bool, opt_problem*)’: > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:217: error: class > ‘opt_result’ does not have any field named ‘opt_wrapper’ > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:217: error: no matching > function for call to ‘opt_wrapper::opt_wrapper()’ > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:160: note: candidates > are: opt_wrapper::opt_wrapper(T, opt_problem*) [with T = bool] > /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:147: note: >opt_wrapper::opt_wrapper(const opt_wrapper&) > make[3]: *** [gimple-loop-interchange.o] Error 1 > > Is 9.0 supposed to build with a build compiler this old? Yes. GCC 4.3 doesn't define the injected-class-name for the base, so this patch is needed: --- a/gcc/opt-problem.h +++ b/gcc/opt-problem.h @@ -214,7 +214,7 @@ class opt_result : public opt_wrapper /* Private ctor. Instances should be created by the success and failure static member functions. */ opt_result (wrapped_t result, opt_problem *problem) - : opt_wrapper (result, problem) + : opt_wrapper (result, problem) {} };
Building with old gcc
I'm trying to build the current code on Linux with GCC 4.3.2 (stock compiler in Fedora 10 which is my old test system). It fails like this: In file included from /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/tree-data-ref.h:27, from /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/gimple-loop-interchange.cc:44: /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h: In constructor ‘opt_result::opt_result(bool, opt_problem*)’: /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:217: error: class ‘opt_result’ does not have any field named ‘opt_wrapper’ /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:217: error: no matching function for call to ‘opt_wrapper::opt_wrapper()’ /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:160: note: candidates are: opt_wrapper::opt_wrapper(T, opt_problem*) [with T = bool] /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:147: note: opt_wrapper::opt_wrapper(const opt_wrapper&) make[3]: *** [gimple-loop-interchange.o] Error 1 Is 9.0 supposed to build with a build compiler this old? The documentation on the GCC web page says an ISO C++ compiler is required but it doesn't tell me whether the C++ compiler in GCC 4.3.2 is adequate. Since many people will be installing GCC using an older version of GCC, it would be good for the documentation to state what the minimum version of GCC is. paul