Home My Page Projects Polyphemus
Summary Activity Forums Tracker Lists Docs News SCM Files Mediawiki

[#21412] Problem of the declaration order of the functions in Airparif.cxx (or its derivates)

Date:
2017-08-10 08:16
Priority:
3
State:
Open
Submitted by:
Youngseob KIM (kimy)
Assigned to:
Nobody (None)
Hardware:
All
Product:
none
Operating System:
Linux
Component:
none
Version:
none
Severity:
none
Resolution:
none
URL:
Summary:
Problem of the declaration order of the functions in Airparif.cxx (or its derivates)

Detailed description
The latest versions of gcc (gcc-4.7 or later) do not accept some extra unqualified lookups that they had performed in the past.

In file included from Airpaca-point.cxx:19:0,
from emissions-airpaca.cpp:37:
Airpaca.cxx: In instantiation of ‘void ComputeTimeSources_Airpaca(const SeldonData::Data<real, 2>&, const SeldonData::Data<int, 1>&, const SeldonData::Data<int, 1>&, const SeldonData::Data<int, 1>&, const SeldonData::RegularGrid<T>&, const SeldonData::Data<real, 1>&, const SeldonData::Data<real, 1>&, const SeldonData::Data<real, 1>&, const SeldonData::Data<real, 1>&, const SeldonData::Data<int, 1>&, const SeldonData::Data<int, 1>&, const SeldonData::Data<real, 2>&, const SeldonData::Data<real, 2>&, const SeldonData::Data<real, 2>&, int, int, int, int, int, const std::vector<int>&, const std::vector<int>&, const std::vector<std::vector<int> >&, const SeldonData::Data<real, 4>&, const SeldonData::Data<real, 4>&, const SeldonData::Data<real, 3>&, const SeldonData::Data<real, 3>&, const SeldonData::Data<real, 3>&, std::__cxx11::string, SeldonData::Data<real, 5>&, int, int) [with real = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
emissions-airpaca.cpp:914:53: required from here
Airpaca.cxx:1907:41: error: ‘ComputeStabilityClass’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
ComputeStabilityClass(lmo_tmp, stability, stability_class);
^
In file included from Airpaca.cxx:19:0,
from Airpaca-point.cxx:19,
from emissions-airpaca.cpp:37:
BriggsFormula.hxx:587:8: note: ‘template<class T> void Polyphemus::ComputeStabilityClass(T, int&, std::__cxx11::string&)’ declared here, later in the translation unit
void ComputeStabilityClass(T L, int& stability, string& stability_class)


A temporal solution is to use cpp=gcc-4.6 for the compiling.

Add A Comment: Notepad

Message  ↓
Date: 2017-08-11 11:32
Sender: Sylvain Doré

Ha... I didn't see the error was on the free functions from BriggsFormula, forget about my previous comment :p

This function lookup is not dependent on template arguments, so gcc want to resolve it at the the call point... In this simple case, it means the code has to be reorganized as we would have done if these funtions were not template.

Date: 2017-08-10 22:25
Sender: Sylvain Doré

Hello,

this is a far shot, but wouldn't it be solved with adding an explicit "this->" in front of the faulty calls?

Sylvain

No Changes Have Been Made to This Item