Building with old gcc
Paolo Carlini
paolo.carlini@oracle.com
Tue Oct 9 13:48:00 GMT 2018
Hi,
On 09/10/18 15:33, Jonathan Wakely wrote:
> On Tue, 9 Oct 2018 at 14:30, Paul Koning <paulkoning@comcast.net> 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<bool>::opt_wrapper()â
>> /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:160: note: candidates are: opt_wrapper<T>::opt_wrapper(T, opt_problem*) [with T = bool]
>> /mnt/hgfs/pkoning/Documents/svn/gcc/gcc/opt-problem.h:147: note: opt_wrapper<bool>::opt_wrapper(const opt_wrapper<bool>&)
>> 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 <bool>
> /* 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<bool> (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.
More information about the Gcc
mailing list