diff options
author | Brian Drummond | 2013-12-05 14:58:40 +0000 |
---|---|---|
committer | Brian Drummond | 2013-12-05 14:58:40 +0000 |
commit | 393aa0342e6340c5f0ed48a2b20868de2cfad6ef (patch) | |
tree | 94d33ab1cfd8bf73b2793679b1ab3ca3b43950d8 /ortho/gcc | |
parent | 276e78d5b48853ae3bca02c3491db21dacd5a210 (diff) | |
download | ghdl-393aa0342e6340c5f0ed48a2b20868de2cfad6ef.tar.gz ghdl-393aa0342e6340c5f0ed48a2b20868de2cfad6ef.tar.bz2 ghdl-393aa0342e6340c5f0ed48a2b20868de2cfad6ef.zip |
Fix ortho-lang.c, type_for_size to allow 32 or 64bit builds
Diffstat (limited to 'ortho/gcc')
-rw-r--r-- | ortho/gcc/ortho-lang.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ortho/gcc/ortho-lang.c b/ortho/gcc/ortho-lang.c index 22e303a..b46c012 100644 --- a/ortho/gcc/ortho-lang.c +++ b/ortho/gcc/ortho-lang.c @@ -639,7 +639,9 @@ type_for_size (unsigned int precision, int unsignedp) else // Handle larger requests by returning a NULL tree and letting // the back end default to another approach. - t = NULL_TREE; + // the exact test is unknown : distinguishing between 32 and 64 bits may be enough + // for all likely platforms + if (MAX_BITS_PER_WORD >= 64) t = NULL_TREE; return t; } @@ -1223,7 +1225,7 @@ start_enum_type (struct o_enum_list *list, int size) void new_enum_literal (struct o_enum_list *list, tree ident, tree *res) { - *res = build_int_cstu (list->res, HOST_WIDE_INT(list->num)); + *res = build_int_cstu (list->res, (HOST_WIDE_INT)(list->num)); chain_append (&list->chain, tree_cons (ident, *res, NULL_TREE)); list->num++; } |