bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Re: Emacs 21.1 on HP-UX 10.20 behaves oddly]


From: Eli Zaretskii
Subject: Re: address@hidden: Re: Emacs 21.1 on HP-UX 10.20 behaves oddly]
Date: Wed, 06 Feb 2002 21:14:34 +0200

> Date: Tue, 5 Feb 2002 14:05:43 +0200 (EET)
> From: Esa A E Peuha <address@hidden>
> 
> > Could you please tell what version of HP's cc is that?
> 
> HP92453-01 A.10.32.22
> 
> > Also, is this miscompilation something that's likely to happen in other
> > cases of a?b:c operator, or is get_charset_id somehow special?
> 
> It apparently depends on the complexity of the condition clause; when I
> put the SYMBOLP part in a separate if statement in get_charset_id, it
> compiled properly, but I'm not sure what other clauses may be too
> complex.

Thanks.  FYI, here's the change I committed to the Emacs CVS tree:


2002-02-06  Eli Zaretskii  <address@hidden>

        * charset.c (get_charset_id): Use if-else instead of ?:.

Index: src/charset.c
===================================================================
RCS file: /cvs/emacs/src/charset.c,v
retrieving revision 1.118.4.1
diff -c -p -r1.118.4.1 charset.c
*** src/charset.c       6 Feb 2002 18:51:07 -0000       1.118.4.1
--- src/charset.c       6 Feb 2002 19:01:57 -0000
*************** get_charset_id (charset_symbol)
*** 599,609 ****
    Lisp_Object val;
    int charset;
  
!   return ((SYMBOLP (charset_symbol)
!          && (val = Fget (charset_symbol, Qcharset), VECTORP (val))
!          && (charset = XINT (XVECTOR (val)->contents[CHARSET_ID_IDX]),
!              CHARSET_VALID_P (charset)))
!         ? charset : -1);
  }
  
  /* Return an identification number for a new private charset of
--- 599,613 ----
    Lisp_Object val;
    int charset;
  
!   /* This originally used a ?: operator, but reportedly the HP-UX
!      compiler version HP92453-01 A.10.32.22 miscompiles that.  */
!   if (SYMBOLP (charset_symbol)
!       && VECTORP (val = Fget (charset_symbol, Qcharset))
!       && CHARSET_VALID_P (charset =
!                         XINT (XVECTOR (val)->contents[CHARSET_ID_IDX])))
!     return charset;
!   else
!     return -1;
  }
  
  /* Return an identification number for a new private charset of



reply via email to

[Prev in Thread] Current Thread [Next in Thread]