-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typedef byte compatibility issue #282
Comments
Hello, Thank you for bringing this compatibility issue to our attention and for suggesting a solution. I understand your approach of changing the As an alternative, could you try manually modifying the definition of #ifdef __cplusplus
#include <cstddef>
using byte = std::byte;
#else
typedef uint8_t byte;
#endif This change uses a C++-specific approach to redefine If this solution works for you without causing any issues, it would be great if you could make a pull request with this change. This contribution could be very valuable for other users facing similar compatibility challenges in C++ environments. |
Hello I am using this compiler with a c++ proyect and I am having compatibility problems. The problem is that the byte definition is done in std. This is the fail:
/usr/include/c++/9/cstddef:69:14: note: candidates are: ‘enum class std::byte’
69 | enum class byte : unsigned char {};
I solve it by changing the definitions of some files, I change the name of the byte definition to asn_byte. The files are:
asn1crt.h:
line 75 : uint8_t byte;
line 129: byte *buf
line 147: byte *buf
line 181: int GetCharIndex(char ch, byte allowedCharSet[], int setLen);
LangGeneric_c.fs:
**line 295:**GenericLocalVariable {GenericLocalVariable.name = "arr"; varType = "byte"; arrSize = Some sReqBytesForUperEncoding; isStatic = true; initExp = None}
Header_c.stg
line 161: byte arr[];
line 184: byte arr[];
I guess this asn compiler is not intended for c++ but I hope you can make it compatible as well.
The text was updated successfully, but these errors were encountered: