-
Notifications
You must be signed in to change notification settings - Fork 413
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
configurator: regression in handling expressions for C imports #1720
Comments
avsm
added a commit
to avsm/dune
that referenced
this issue
Dec 31, 2018
The current `C_define.Type.Int` supports signed integers since the fix in ocaml#1344. This fix meant that some C expressions cannot be evaluated such as `sizeof(expr)` since those are not valid in cpp. This changeset adds a new `Uint` type switch that is expressly for the purpose of evaluating unsigned C integers only. This allows for constructs such as `sizeof(expr)`. This changeset lets the Ctypes library completely use Configurator for all of its compile-time tests (yallop/ocaml-ctypes#574) fixes ocaml#1720 Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
emillon
added a commit
to emillon/dune
that referenced
this issue
Jan 2, 2019
emillon
added a commit
to emillon/dune
that referenced
this issue
Jan 2, 2019
Rather than using the preprocessor to determine the sign of a value, we store both `x` and `-x`. One of them has an all-digit representation. Closes ocaml#1720 Signed-off-by: Etienne Millon <me@emillon.org>
emillon
added a commit
to emillon/dune
that referenced
this issue
Jan 2, 2019
Signed-off-by: Etienne Millon <me@emillon.org>
emillon
added a commit
to emillon/dune
that referenced
this issue
Jan 2, 2019
Rather than using the preprocessor to determine the sign of a value, we store both `x` and `-x`. One of them has an all-digit representation. Closes ocaml#1720 Signed-off-by: Etienne Millon <me@emillon.org>
emillon
added a commit
to emillon/dune
that referenced
this issue
Jan 2, 2019
Signed-off-by: Etienne Millon <me@emillon.org>
emillon
added a commit
to emillon/dune
that referenced
this issue
Jan 2, 2019
Rather than using the preprocessor to determine the sign of a value, we store both `x` and `-x`. One of them has an all-digit representation. Closes ocaml#1720 Signed-off-by: Etienne Millon <me@emillon.org>
Closed by #1726 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The fix for importing negative numbers in header files (#1334) added a dependency on the expression passed in also working with cpp. This prevents expressions such as
sizeof(char)
from being evaluated, as it leads to this error:I'm not sure what the best way to handle this is without knowing ahead of time if the value is possibly signed or not. We could distinguish
C_define.Type
to have aUint
that will not need the preprocess change above...(This issue comes up when porting ctypes to dune)
The text was updated successfully, but these errors were encountered: