diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-03-06 00:49:27 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-03-06 00:49:27 -0800 |
commit | 2176bfdd1be53c65b8d6645c31f49f756e2dd3b1 (patch) | |
tree | 803c5f05f70adbcf6dbcc7c9839b33de6404d351 | |
parent | df3566afa1a0b329ffa22773e79f1c67281e44c4 (diff) | |
download | txr-2176bfdd1be53c65b8d6645c31f49f756e2dd3b1.tar.gz txr-2176bfdd1be53c65b8d6645c31f49f756e2dd3b1.tar.bz2 txr-2176bfdd1be53c65b8d6645c31f49f756e2dd3b1.zip |
g++ regressions.
* eval.c (env_k): Duplicate global variable definition removed.
* lib.c (vector, vec_set_length): Fixed signed/unsigned comparison
warnings.
* stream.h (stdin_s, stdout_s, stddebug_s, stderr_s, stdnull_s):
Declarations were definitions due to missing extern.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | lib.c | 4 | ||||
-rw-r--r-- | stream.h | 2 |
4 files changed, 16 insertions, 4 deletions
@@ -1,3 +1,15 @@ +2014-03-06 Kaz Kylheku <kaz@kylheku.com> + + g++ regressions. + + * eval.c (env_k): Duplicate global variable definition removed. + + * lib.c (vector, vec_set_length): Fixed signed/unsigned comparison + warnings. + + * stream.h (stdin_s, stdout_s, stddebug_s, stderr_s, stdnull_s): + Declarations were definitions due to missing extern. + 2014-03-05 Kaz Kylheku <kaz@kylheku.com> * txr.c (txr_main): Don't push back arg into arg_list if arg is nil. @@ -86,7 +86,7 @@ val vector_lit_s, vector_list_s; val macro_time_s, with_saved_vars_s, macrolet_s; val defsymacro_s, symacrolet_s; -val special_s, whole_k, env_k; +val special_s, whole_k; val last_form_evaled; @@ -3860,7 +3860,7 @@ val vector(val length, val initval) int i; cnum alloc_plus = c_num(length) + 2; size_t size = alloc_plus * sizeof (val); - val *v = (size / sizeof *v == alloc_plus) + val *v = ((cnum) (size / sizeof *v) == alloc_plus) ? (val *) chk_malloc(size) : (val *) uw_throwf(error_s, lit("vector: length ~a is too large"), length, nao); @@ -3895,7 +3895,7 @@ val vec_set_length(val vec, val length) cnum length_delta = new_length - old_length; cnum alloc_delta = new_length - old_alloc; - if (new_length > ((size_t) -1)/(sizeof (val)) - 2) + if (new_length > (cnum) ((size_t) -1/sizeof (val) - 2)) uw_throwf(error_s, lit("vec-set-length: cannot extend to length ~s"), length, nao); @@ -62,7 +62,7 @@ extern val atime_k, mtime_k, ctime_k; extern val from_start_k, from_current_k, from_end_k; extern val real_time_k, name_k; -val stdin_s, stdout_s, stddebug_s, stderr_s, stdnull_s; +extern val stdin_s, stdout_s, stddebug_s, stderr_s, stdnull_s; val make_null_stream(void); val make_stdio_stream(FILE *, val descr); |