Article View: gnu.epoch.misc
Article #23Patch to silence a GCC warning
From: meissner
Date: Wed, 04 Nov 1992 09:04
Date: Wed, 04 Nov 1992 09:04
27 lines
1417 bytes
1417 bytes
Wed Nov 4 13:55:47 1992 Michael Meissner (meissner@osf.org) * buffer.h (is_control_char, is_meta_char): Use unsigned test for doing ranges, which is faster, and causes GCC not to warn about 'test is always true due to limited range' when given an unsigned argument in indent.c and xdispepoch.c. *** buffer.h.orig Wed Nov 4 13:43:00 1992 --- buffer.h Wed Nov 4 13:46:34 1992 *************** *** 284,290 **** #define BufferSafeFloor(n) (BEGV <= GPT && GPT <= (n) ? GPT : BEGV) ! #define is_control_char(c) (((c) >= 0 && (c) < 040) || (c) == 0177) ! #define is_meta_char(c) ((c) > 0240 && (c) <= 0377) extern void reset_buffer (); --- 284,291 ---- #define BufferSafeFloor(n) (BEGV <= GPT && GPT <= (n) ? GPT : BEGV) ! #define is_in_range(c,l,h) ((unsigned)((c) - (l)) > (unsigned)((c) - (h))) ! #define is_control_char(c) (is_in_range (c, 0, 037) || (c) == 0177) ! #define is_meta_char(c) is_in_range (c, 0241, 0377) extern void reset_buffer ();
Technical Details
Message-ID:
<9211041904.AA05855@curley.osf.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!osf.ORG!meissnerShow Full Headers
Complete Article Headers
Newsgroups: gnu.epoch.misc Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!osf.ORG!meissner From: meissner@osf.ORG Subject: Patch to silence a GCC warning Message-ID: <9211041904.AA05855@curley.osf.org> Sender: daemon@cis.ohio-state.edu Organization: GNUs Not Usenet Distribution: gnu Date: Wed, 4 Nov 1992 09:04:39 GMT Lines: 27