Hi,
I'm successfully building C++20 project with edk2 under the GCC compiler.
Currently I'm trying to add edk2-libc to this project, but encountered issue with <string.h> header.
```
edk2/StdLib/Include/string.h:487:19: error: ISO C++17 does not allow ‘register’ storage class specifier [-Werror=register] register char **stringp
```
Why `strsep(register char **stringp, register const char *delim)` parameters has register storage class-class specifier?
C standard states the `register` keyword is only hint for the compiler and the extent to which such
suggestions are effective is implementation-defined. Do you see any real performance improvements thanks to this?
As I can see FreeBSD libc and musl do not have `register` keyword in signature of this function.
How do you think, may we remove `register` keyword from headers in Include directory?
Second option I see is to add
```
#ifdef __cplusplus
#define register
#endif
```
Of course I may submit patch for this change.
Paweł
_._,_._,_
Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#115541) |
|
Mute This Topic
| New Topic
Your Subscription |
Contact Group Owner |
Unsubscribe
[rebecca@openfw.io]
_._,_._,_