Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Redundunt declarations in headers

Eugene_Zelenko
Beginner
821 Views

Hi!

I think will be great if MKL developers will compile test C/C++ application as part of release process with GCC with warnings enabled (-Wall -Wextra -Wredundant-decls -Wstrict-prototypes) and treated as error (-Werror)

MKL 11.0 Update 1 has next problems:

mkl_lapack.h:148: warning: redundant redeclaration of 'void CGEMQRT(const char*, const char*, const int*, const int*, const int*, const int*, const MKL_Complex8*, const int*, const MKL_Complex8*, const int*, MKL_Complex8*, const int*, MKL_Complex8*, int*)' in same scope
mkl_lapack.h:51: warning: previous declaration of 'void CGEMQRT(const char*, const char*, const int*, const int*, const int*, const int*, const MKL_Complex8*, const int*, const MKL_Complex8*, const int*, MKL_Complex8*, const int*, MKL_Complex8*, int*)'
mkl_lapack.h:154: warning: redundant redeclaration of 'void DGEMQRT(const char*, const char*, const int*, const int*, const int*, const int*, const double*, const int*, const double*, const int*, double*, const int*, double*, int*)' in same scope
mkl_lapack.h:76: warning: previous declaration of 'void DGEMQRT(const char*, const char*, const int*, const int*, const int*, const int*, const double*, const int*, const double*, const int*, double*, const int*, double*, int*)'
mkl_lapack.h:160: warning: redundant redeclaration of 'void SGEMQRT(const char*, const char*, const int*, const int*, const int*, const int*, const float*, const int*, const float*, const int*, float*, const int*, float*, int*)' in same scope
mkl_lapack.h:97: warning: previous declaration of 'void SGEMQRT(const char*, const char*, const int*, const int*, const int*, const int*, const float*, const int*, const float*, const int*, float*, const int*, float*, int*)'
mkl_lapack.h:167: warning: redundant redeclaration of 'void ZGEMQRT(const char*, const char*, const int*, const int*, const int*, const int*, const MKL_Complex16*, const int*, const MKL_Complex16*, const int*, MKL_Complex16*, const int*, MKL_Complex16*, int*)' in same scope
mkl_lapack.h:118: warning: previous declaration of 'void ZGEMQRT(const char*, const char*, const int*, const int*, const int*, const int*, const MKL_Complex16*, const int*, const MKL_Complex16*, const int*, MKL_Complex16*, const int*, MKL_Complex16*, int*)'

With best regards,

Eugene.

0 Kudos
6 Replies
Gennady_F_Intel
Moderator
821 Views
Eugeny, what gcc compiler do you use to see these warnings?
0 Kudos
Eugene_Zelenko
Beginner
821 Views
Hi, Gennady! We use GCC 4.4.5 but same warnings could be generated by 4.1.2 and 4.7.2 and more then likely by other versions. There are also incorrect function prototypes from C point of view: mkl_service.h:130:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] mkl_service.h:132:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] mkl_service.h:135:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] With best regards, Eugene.
0 Kudos
Gennady_F_Intel
Moderator
821 Views

Eugene, please see if you will see these redundant declaration with the latest update 4. ( MKL 11.0. update 4). We tried to removed these warinings.

0 Kudos
SergeyKostrov
Valued Contributor II
821 Views
I just checked mkl_lapack.h header in MKL 11.0 Update 2 ( for Windows ) and I didn't see any references to CGEMQRT function.
0 Kudos
Eugene_Zelenko
Beginner
821 Views

Hi, Gennady!

Thank you for help!

I'll ask out IT to install new version and check fix.

0 Kudos
Eugene_Zelenko
Beginner
821 Views

Hi, Gennady!

I'm sorry for huge delay, but our IT just installed MKL version 11.0 update 5.

But warnings for Linux version are still there:

/gcc481_new/bin/gcc -Wall -Wextra -Wredundant-decls -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes -I <ICC path>/mkl/include/ MKL.c -o MKL.exe                                                                                                                                                                                                              

In file included from <ICC path>/mkl/include/mkl.h:50:0,                                                                                                                                                   
                 from MKL.c:1:                                                                                                                                                                             
<ICC path>/mkl/include/mkl_lapack.h:2230:6: warning: redundant redeclaration of 'CGEQR2' [-Wredundant-decls]                                                                                               
 void CGEQR2( const MKL_INT* m, const MKL_INT* n, MKL_Complex8* a,                                                                                                                                         
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:223:6: note: previous declaration of 'CGEQR2' was here                                                                                                                 
 void CGEQR2( const MKL_INT* m, const MKL_INT* n,                                                                                                                                                          
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:2233:6: warning: redundant redeclaration of 'CGEQR2_' [-Wredundant-decls]                                                                                              
 void CGEQR2_( const MKL_INT* m, const MKL_INT* n, MKL_Complex8* a,                                                                                                                                        
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:227:6: note: previous declaration of 'CGEQR2_' was here                                                                                                                
 void CGEQR2_( const MKL_INT* m, const MKL_INT* n,                                                                                                                                                         
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:2236:6: warning: redundant redeclaration of 'cgeqr2' [-Wredundant-decls]                                                                                               
 void cgeqr2( const MKL_INT* m, const MKL_INT* n, MKL_Complex8* a,                                                                                                                                         
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:231:6: note: previous declaration of 'cgeqr2' was here                                                                                                                 
 void cgeqr2( const MKL_INT* m, const MKL_INT* n,                                                                                                                                                          
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:2239:6: warning: redundant redeclaration of 'cgeqr2_' [-Wredundant-decls]                                                                                              
 void cgeqr2_( const MKL_INT* m, const MKL_INT* n, MKL_Complex8* a,                                                                                                                                        
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:235:6: note: previous declaration of 'cgeqr2_' was here                                                                                                                
 void cgeqr2_( const MKL_INT* m, const MKL_INT* n,                                                                                                                                                         
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:8247:6: warning: redundant redeclaration of 'DGEQR2' [-Wredundant-decls]                                                                                               
 void DGEQR2( const MKL_INT* m, const MKL_INT* n, double* a, const MKL_INT* lda,                                                                                                                           
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:239:6: note: previous declaration of 'DGEQR2' was here                                                                                                                 
 void DGEQR2( const MKL_INT* m, const MKL_INT* n,                                                                                                                                                          
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:8249:6: warning: redundant redeclaration of 'DGEQR2_' [-Wredundant-decls]                                                                                              
 void DGEQR2_( const MKL_INT* m, const MKL_INT* n, double* a,                                                                                                                                              
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:243:6: note: previous declaration of 'DGEQR2_' was here                                                                                                                
 void DGEQR2_( const MKL_INT* m, const MKL_INT* n,                                                                                                                                                         
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:8251:6: warning: redundant redeclaration of 'dgeqr2' [-Wredundant-decls]                                                                                               
 void dgeqr2( const MKL_INT* m, const MKL_INT* n, double* a, const MKL_INT* lda,                                                                                                                           
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:247:6: note: previous declaration of 'dgeqr2' was here                                                                                                                 
 void dgeqr2( const MKL_INT* m, const MKL_INT* n,                                                                                                                                                          
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:8253:6: warning: redundant redeclaration of 'dgeqr2_' [-Wredundant-decls]                                                                                              
 void dgeqr2_( const MKL_INT* m, const MKL_INT* n, double* a,                                                                                                                                              
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:251:6: note: previous declaration of 'dgeqr2_' was here                                                                                                                
 void dgeqr2_( const MKL_INT* m, const MKL_INT* n,                                                                                                                                                         
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:14751:6: warning: redundant redeclaration of 'SGEQR2' [-Wredundant-decls]                                                                                              
 void SGEQR2( const MKL_INT* m, const MKL_INT* n, float* a, const MKL_INT* lda,                                                                                                                            
      ^                                                                                                                                                                                                    
<ICC path>/mkl/include/mkl_lapack.h:255:6: note: previous declaration of 'SGEQR2' was here
 void SGEQR2( const MKL_INT* m, const MKL_INT* n,
      ^
<ICC path>/mkl/include/mkl_lapack.h:14753:6: warning: redundant redeclaration of 'SGEQR2_' [-Wredundant-decls]
 void SGEQR2_( const MKL_INT* m, const MKL_INT* n, float* a, const MKL_INT* lda,
      ^
<ICC path>/mkl/include/mkl_lapack.h:259:6: note: previous declaration of 'SGEQR2_' was here
 void SGEQR2_( const MKL_INT* m, const MKL_INT* n,
      ^
<ICC path>/mkl/include/mkl_lapack.h:14755:6: warning: redundant redeclaration of 'sgeqr2' [-Wredundant-decls]
 void sgeqr2( const MKL_INT* m, const MKL_INT* n, float* a, const MKL_INT* lda,
      ^
<ICC path>/mkl/include/mkl_lapack.h:263:6: note: previous declaration of 'sgeqr2' was here
 void sgeqr2( const MKL_INT* m, const MKL_INT* n,
      ^
<ICC path>/mkl/include/mkl_lapack.h:14757:6: warning: redundant redeclaration of 'sgeqr2_' [-Wredundant-decls]
 void sgeqr2_( const MKL_INT* m, const MKL_INT* n, float* a, const MKL_INT* lda,
      ^
<ICC path>/mkl/include/mkl_lapack.h:267:6: note: previous declaration of 'sgeqr2_' was here
 void sgeqr2_( const MKL_INT* m, const MKL_INT* n,
      ^
<ICC path>/mkl/include/mkl_lapack.h:21008:6: warning: redundant redeclaration of 'ZGEQR2' [-Wredundant-decls]
 void ZGEQR2( const MKL_INT* m, const MKL_INT* n, MKL_Complex16* a,
      ^
<ICC path>/mkl/include/mkl_lapack.h:271:6: note: previous declaration of 'ZGEQR2' was here
 void ZGEQR2( const MKL_INT* m, const MKL_INT* n,
      ^
<ICC path>/mkl/include/mkl_lapack.h:21011:6: warning: redundant redeclaration of 'ZGEQR2_' [-Wredundant-decls]
 void ZGEQR2_( const MKL_INT* m, const MKL_INT* n, MKL_Complex16* a,
      ^
<ICC path>/mkl/include/mkl_lapack.h:275:6: note: previous declaration of 'ZGEQR2_' was here
 void ZGEQR2_( const MKL_INT* m, const MKL_INT* n,
      ^
<ICC path>/mkl/include/mkl_lapack.h:21014:6: warning: redundant redeclaration of 'zgeqr2' [-Wredundant-decls]
 void zgeqr2( const MKL_INT* m, const MKL_INT* n, MKL_Complex16* a,
      ^
<ICC path>/mkl/include/mkl_lapack.h:279:6: note: previous declaration of 'zgeqr2' was here
 void zgeqr2( const MKL_INT* m, const MKL_INT* n,
      ^
<ICC path>/mkl/include/mkl_lapack.h:21017:6: warning: redundant redeclaration of 'zgeqr2_' [-Wredundant-decls]
 void zgeqr2_( const MKL_INT* m, const MKL_INT* n, MKL_Complex16* a,
      ^
<ICC path>/mkl/include/mkl_lapack.h:283:6: note: previous declaration of 'zgeqr2_' was here
 void zgeqr2_( const MKL_INT* m, const MKL_INT* n,

0 Kudos
Reply