Mercurial > hg > xemacs-beta
comparison src/lisp.h @ 2956:ee35a8fdcfcd
[xemacs-hg @ 2005-09-27 05:29:41 by ben]
fix compilation warnings
text.c, event-Xt.c, lisp.h, number-gmp.c, number-gmp.h: Fix compilation warnings. A couple of changes of new -> new_,
'foo -> `foo'.
author | ben |
---|---|
date | Tue, 27 Sep 2005 05:29:45 +0000 |
parents | b95fe16005fd |
children | 1e7cc382eb16 |
comparison
equal
deleted
inserted
replaced
2955:4d269e525e21 | 2956:ee35a8fdcfcd |
---|---|
504 | 504 |
505 /* Implement strong type-checking of the above integral types by declaring | 505 /* Implement strong type-checking of the above integral types by declaring |
506 them to be classes and using operator overloading. Unfortunately this | 506 them to be classes and using operator overloading. Unfortunately this |
507 is a huge pain in the ass because C++ doesn't strongly distinguish | 507 is a huge pain in the ass because C++ doesn't strongly distinguish |
508 "bool" and "size_t" from int. The problem is especially bad with "bool" | 508 "bool" and "size_t" from int. The problem is especially bad with "bool" |
509 -- if you want to be able to say 'if (len--)' where len is e.g. a | 509 -- if you want to be able to say `if (len--)' where len is e.g. a |
510 Bytecount, you need to declare a conversion operator to bool(); and | 510 Bytecount, you need to declare a conversion operator to bool(); and |
511 since bool is just an alias for int, you suddenly get tons and tons of | 511 since bool is just an alias for int, you suddenly get tons and tons of |
512 ambiguities, which need to be resolved by lots of laborious declarations | 512 ambiguities, which need to be resolved by lots of laborious declarations |
513 for every single possible type combination. Hence the multitude of | 513 for every single possible type combination. Hence the multitude of |
514 declarations in DECLARE_INTCLASS_ARITH_COMPARE(). The bool/int | 514 declarations in DECLARE_INTCLASS_ARITH_COMPARE(). The bool/int |
1047 ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, msg)) | 1047 ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, msg)) |
1048 # define assert_at_line(x, file, line) \ | 1048 # define assert_at_line(x, file, line) \ |
1049 ((x) ? (void) 0 : assert_failed (file, line, #x)) | 1049 ((x) ? (void) 0 : assert_failed (file, line, #x)) |
1050 #elif defined (DEBUG_XEMACS) | 1050 #elif defined (DEBUG_XEMACS) |
1051 # define assert(x) ((x) ? (void) 0 : (void) ABORT ()) | 1051 # define assert(x) ((x) ? (void) 0 : (void) ABORT ()) |
1052 # define assert_with_message(x, msg) ((x) ? (void) 0 : (void) ABORT ()) | 1052 # define assert_with_message(x, msg) assert (x) |
1053 # define assert_at_line(x, file, line) assert (x) | 1053 # define assert_at_line(x, file, line) assert (x) |
1054 #else | 1054 #else |
1055 # define assert(x) ((void) 0) | 1055 /* This used to be ((void) (0)) but that triggers lots of unused variable |
1056 # define assert_with_message(x, msg) | 1056 warnings. It's pointless to force all that code to be rewritten, with |
1057 added ifdefs. Any reasonable compiler will eliminate an expression with | |
1058 no effects. */ | |
1059 # define assert(x) ((void) (x)) | |
1060 # define assert_with_message(x, msg) assert (x) | |
1057 # define assert_at_line(x, file, line) assert (x) | 1061 # define assert_at_line(x, file, line) assert (x) |
1058 #endif | 1062 #endif |
1059 | 1063 |
1060 /************************************************************************/ | 1064 /************************************************************************/ |
1061 /** Memory allocation **/ | 1065 /** Memory allocation **/ |