| Issue |
183815
|
| Summary |
hexagon_types.h defines B0
|
| Labels |
backend:Hexagon
|
| Assignees |
|
| Reporter |
androm3da
|
B0 is a macro that's defined by `termios.h` on some systems.
```cpp
#include <termios.h> // defines B0 as a macro on POSIX systems
#include <hexagon_types.h> // uses B0 as member function name → error
int main() { return 0; }
```
But `hexagon_types.h` defines a `B0`
```
// Extract byte methods
signed char B0(void) {
return HEXAGON_V64_GET_B0(data);
};
```
... so legitimate programs using termios (specified by POSIX) will get errors like below.
```
hexagon_types.h:700:15: error: expected ';' at end of declaration list
700 | signed char B0(void) {
hexagon_types.h:779:19: error: field has incomplete type 'HEXAGON_Vect64C'
779 | HEXAGON_Vect64C B0(signed char b) {
```
Qualify this identifier or change it somehow so it doesn't conflict with the POSIX macro.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs