boinc/client/dhrystone.h

58 lines
1.5 KiB
C
Raw Normal View History

Fix compiler warning "-Wregister" dhrystone2.cpp:56:17: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister] 56 | REG One_Fifty Int_Index; | ^~~~~~~~~ dhrystone2.cpp:57:17: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister] 57 | REG One_Fifty Int_Loc; | ^~~~~~~ dhrystone2.cpp: In function ‘bool Func_2(DS_DATA&, char*, char*)’: dhrystone2.cpp:91:25: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister] 91 | REG One_Thirty Int_Loc; | ^~~~~~~ CXX boinc_client-whetstone.o dhrystone.cpp: In function ‘int dhrystone(double&, double&, double&, double)’: dhrystone.cpp:83:25: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister] 83 | REG One_Fifty Int_2_Loc; | ^~~~~~~~~ dhrystone.cpp:85:25: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister] 85 | REG char Ch_Index; | ^~~~~~~~ dhrystone.cpp:97:24: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister] 97 | REG unsigned long Run_Index; | ^~~~~~~~~ dhrystone.cpp: At global scope: dhrystone.cpp:184:42: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister] 184 | void Proc_1(DS_DATA& dd, REG Rec_Pointer Ptr_Val_Par) | ^~~~~~~~~~~ dhrystone.cpp: In function ‘void Proc_1(DS_DATA&, Rec_Pointer)’: dhrystone.cpp:186:19: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister] 186 | REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp; | ^~~~~~~~~~~
2022-01-20 08:22:31 +00:00
#if defined __APPLE__ || __cplusplus >= 201703L
#define REG
#else
#define REG register
#endif
typedef enum {Ident_1, Ident_2, Ident_3, Ident_4, Ident_5} Enumeration;
typedef int One_Thirty;
typedef int One_Fifty;
typedef char Capital_Letter;
typedef char Str_30[31];
typedef int Arr_1_Dim[50];
typedef int Arr_2_Dim[50][50];
typedef struct Record {
struct Record *Ptr_Comp;
Enumeration Discr;
union {
struct {
Enumeration Enum_Comp;
int Int_Comp;
char Str_Comp [31];
} var_1;
struct {
Enumeration E_Comp_2;
char Str_2_Comp [31];
} var_2;
struct {
char Ch_1_Comp;
char Ch_2_Comp;
} var_3;
} variant;
} Rec_Type, *Rec_Pointer;
struct DS_DATA {
Rec_Pointer _Ptr_Glob;
Rec_Pointer _Next_Ptr_Glob;
int _Int_Glob;
bool _Bool_Glob;
char _Ch_1_Glob;
char _Ch_2_Glob;
Arr_1_Dim _Arr_1_Glob;
Arr_2_Dim _Arr_2_Glob;
};
#define Int_Glob dd._Int_Glob
#define Bool_Glob dd._Bool_Glob
#define Ch_1_Glob dd._Ch_1_Glob
#define Ch_2_Glob dd._Ch_2_Glob
#define Arr_1_Glob dd._Arr_1_Glob
#define Arr_2_Glob dd._Arr_2_Glob
#define Ptr_Glob dd._Ptr_Glob
#define Next_Ptr_Glob dd._Next_Ptr_Glob