Fails compilation with "catching polymorphic type ‘class std::exception’"
Bug #1949632 reported by
Peter Scholtens
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnuclad |
New
|
Undecided
|
Unassigned |
Bug Description
On Ubuntu 20.04 the source code fails to compile with the following error message:
gnuclad.cpp: In function ‘int main(int, char**)’:
gnuclad.cpp:145:21: error: catching polymorphic type ‘class std::exception’ by value [-Werror=
145 | } catch(exception e) {
Simple replacing "e" with "&e" in line 145 of gnuclad.cpp does solve the warning. It resembles the problem described here:
https:/
To post a comment you must log in.