Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Compilation gets stuck with flag -Wshadow when using boost/operators

C__Schwarzmeier
Beginner
419 Views

The following code can not be compiled with the Intel C++ compiler and flag -Wshadow. The compilation gets stuck without any further error message. However, the code compiles fine with the Intel C++ compiler when neglecting the flag -Wshadow.

#include <boost/operators.hpp>

class C
   : boost::ordered_euclidian_ring_operators1< C
   , boost::ordered_euclidian_ring_operators2< C, int
   , boost::ordered_euclidian_ring_operators2< C, double
> > > 
{
   C (long i) {}
};

int main() {}


I have tested  and reproduced this issue with versions 13.1.3, 14.0.3, 16.0.4, 17.0.5, 18.0.4 and 19.0.4 of the Intel C++ compiler using boost versions 1.61.0 and 1.70.0.
In contrast, the same code compiles fine with flag -Wshadow with various versions of the GNU C++ compiler and the LLVM Clang C++ compiler.

0 Kudos
4 Replies
Viet_H_Intel
Moderator
419 Views

Can you create a preprocessed file for us?

0 Kudos
C__Schwarzmeier
Beginner
419 Views

Thank you for the quick response.

Please find attached the preprocessed file generated with the Intel C++ compiler 19.0.4.243 and boost 1.70.0.
For the sake of completeness, I have also attached the preprocessed file obtained with the GNU C++ compiler 8.1.0 and boost 1.70.0.

0 Kudos
Viet_H_Intel
Moderator
419 Views

Thank for the .i file. I'll look into it.

0 Kudos
Viet_H_Intel
Moderator
419 Views

I've reported this issue to our compiler Engineer. Internal bug number is: CMPLRIL0-32173

0 Kudos
Reply