Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove note of GCC ABI change

Tags:

gcc

g++

When I compile my program with GCC 4.7 I get the following note:

/usr/include/c++/4.7/backward/binders.h:167:5: note: the ABI of passing structure with complex float member has changed in GCC 4.4 here

Is there any way to get rid of it? I tried to google it, but all I find is the GCC source code line that prints the note string.

like image 819
Pibben Avatar asked Dec 17 '12 12:12

Pibben


2 Answers

Pass the option -Wno-psabi to GCC.

like image 93
chill Avatar answered Nov 16 '22 03:11

chill


I was getting the same message:

/usr/include/c++/4.8.3/bits/stl_pair.h:276:5: note: the ABI of passing structure with complex float member has changed in GCC 4.4

for the following line of code:

indices.push_back(make_pair(centreIndex,centre));

where centreIndex is an integer and centre is a complex float.

To get rid of the error message I changed the code to:

indices.push_back(pair<int,complex<float> >(centreIndex,centre));

I think this is a better way of doing it because make_pair is just a wrapper for this more direct way of creating a pair.

like image 28
zimzam Avatar answered Nov 16 '22 01:11

zimzam