vendredi 14 août 2015

Why does the compiler complain about the code

I do not understand the cause of the error:

"/pkg/qct/software/arm/RVDS/5.01BLD94/include/assert.h", line 40: Error:  #18: expected a ")"
  extern _ARMABI_NORETURN void abort(void);

The code is as follow:

28 #ifndef __assert_h                                                              
29 #   define __assert_h                                                           
30 #define _ARMABI_NORETURN __declspec(__nothrow) __declspec(__noreturn)           
31 #define __ARMCLIB_VERSION 410000                                                
32 #   undef __CLIBNS                                                              
33 #   ifdef __cplusplus                                                           
34         namespace std {                                                         
35 #           define __CLIBNS ::std::                                             
36             extern "C" {                                                        
37 #   else                                                                        
38 #       define __CLIBNS                                                         
39 #   endif  /* __cplusplus */                                                    
40     extern _ARMABI_NORETURN void abort(void);                                   
41     extern _ARMABI_NORETURN void __aeabi_assert(const char *, const char *, int)
   __attribute__((__nonnull__(1,2)));                                              
42 #   ifdef __cplusplus                                                           
43             }  /* extern "C" */                                                 
44         }  /* namespace std */                                                  
45 #   endif                                                                       
46 #else                                                                           
47 #   undef assert                                                                
48 #   undef __promise                                                             
49 #endif                                                                          

The code is from RVDS. I do not think there is a bug in the header file of the compiler.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire