-
Notifications
You must be signed in to change notification settings - Fork 528
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
duplicate definition of INT8_MAX in Visual Studio 2015 #307
Comments
Cc: @mathturtle |
Would defining |
This is not flex's fault. |
Hrm, indeed. I'll look into the cause for the warning more. Maybe Visual Studio is not following the standard or |
OK, so I read the code wrong, |
Note that VS 2013 does not implement C99, so it doesn't set a suitable |
These defines are provided by `stdint.h` and it should be included first before trying to define them manually. Fixes westes#307.
The [U]INT{8,16,32}_{MIN,MAX} macros are never used in skeleton code. Having them in skeleton just increases the chance of conflicts in case that user defines them in non-C99 environment (see issue westes#307, when flex code is built in Visual C++). flexint.h is now split in two files. Only "flexint_shared.h" will be included in skeleton now, which defines flex integral types. flexint.h contains integer limits macros that would be used in flex only.
The [U]INT{8,16,32}_{MIN,MAX} macros are never used in skeleton code. Having them in skeleton just increases the chance of conflicts in case that user defines them in non-C99 environment (see issue westes#307, when flex code is built in Visual C++ (before VS2013)). flexint.h is now split in two files. Only "flexint_shared.h" will be included in skeleton now, which defines flex integral types. flexint.h contains integer limits macros that would be used in flex only.
Just for another info, VS 2013 has |
The [U]INT{8,16,32}_{MIN,MAX} macros are never used in skeleton code. Having them in skeleton just increases the chance of conflicts in case that user defines them in non-C99 environment (see issue westes#307, when flex code is built in Visual C++ (before VS2013)). flexint.h is now split in two files. Only "flexint_shared.h" will be included in skeleton now, which defines flex integral types. flexint.h contains integer limits macros that would be used in flex only. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
The [U]INT{8,16,32}_{MIN,MAX} macros are never used in skeleton code. Having them in skeleton just increases the chance of conflicts in case that user defines them in non-C99 environment (see issue westes#307, when flex code is built in Visual C++ (before VS2013)). flexint.h is now split in two files. Only "flexint_shared.h" will be included in skeleton now, which defines flex integral types. flexint.h contains integer limits macros that would be used in flex only. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
The [U]INT{8,16,32}_{MIN,MAX} macros are never used in skeleton code. Having them in skeleton just increases the chance of conflicts in case that user defines them in non-C99 environment (see issue #307, when flex code is built in Visual C++ (before VS2013)). flexint.h is now split in two files. Only "flexint_shared.h" will be included in skeleton now, which defines flex integral types. flexint.h contains integer limits macros that would be used in flex only. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Fixed by #309. |
In generated source files, this block is done after including
inttypes.h
, however at least on Visual Studio 2015, these are defined bystdint.h
which is included later in the file causing redefinition warnings.The text was updated successfully, but these errors were encountered: