Delete GCC ABI Change Note

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 do this, but all I found was a GCC source line that prints a note line.

+5
source share
2 answers

Pass the -Wno-psabi to GCC.

+6
source

I got 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 the center 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 the best way to do this because make_pair is just a wrapper for this more direct way to create a pair.

0
source

All Articles