bugGetFEM - Bugs: bug #56854, Compilation errors with GCC 9.2

 
 

bug #56854: Compilation errors with GCC 9.2

Submitter:  Nathan Whetsell <nwhetsell>
Submitted:  Tue 03 Sep 2019 01:59:16 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  logari81
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 22 Nov 2023 07:50:49 PM UTC, comment #1: 

This patch seems to be applied, so I am closing this.

Konstantinos Poulios <logari81>
Group administrator
Tue 03 Sep 2019 01:59:16 PM UTC, original submission:  

To reproduce on macOS Mojave 10.14.6:

  1. Install Homebrew using the instructions at https://brew.sh.
  2. Enter in Terminal:



brew install gcc libtool
curl --location --remote-name https://download.savannah.gnu.org/releases/getfem/stable/getfem-5.3.tar.gz
tar -xf getfem-5.3.tar.gz
cd getfem-5.3
./configure CXX=gcc
make


Compilation fails with:


../../src/getfem/getfem_convect.h:62:27: error: non-const lvalue reference to
      type 'small_vector<...>' cannot bind to a temporary of type
      'small_vector<...>'
               base_node &per_min = base_node(),
                          ^         ~~~~~~~~~~~
../../src/getfem/getfem_convect.h:62:27: note: passing argument to parameter
      'per_min' here
../../src/getfem/getfem_convect.h:63:27: error: non-const lvalue reference to
      type 'small_vector<...>' cannot bind to a temporary of type
      'small_vector<...>'
               base_node &per_max = base_node()) {
                          ^         ~~~~~~~~~~~
../../src/getfem/getfem_convect.h:63:27: note: passing argument to parameter
      'per_max' here


I believe this can fixed by adding const before the base_node type in both places, for example:


               const base_node &per_min = base_node(),


instead of:


               base_node &per_min = base_node(),


I’ve attached a patch with these changes created using:


git diff > getfem_convect.patch.txt


Nathan Whetsell <nwhetsell>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by logari81 (Posted a comment)
  • -email is unavailable- added by nwhetsell (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-11-22 logari81 StatusNone Fixed
        Assigned toNone logari81
        Open/ClosedOpen Closed
    2019-09-03 nwhetsell Attached File- Added getfem_convect.patch.txt, #47442

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code