This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix for bootstrap failure with HP's C compiler


HP's C compiler evidently does not correctly implement the |= operator
when the target is a one-bit bitfield, resulting in a compiler crash.
Here is a one-line patch to fix the problem.

I'll need someone else to apply it.  My papers are not current, but
RMS says this is not an issue for one-line patches.

2003-09-04  Joe Buck  <jbuck@welsh-buck.org>

	* c-decl.c (poplevel): Work around HP C compiler bug.

Index: c-decl.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.441
diff -c -r1.441 c-decl.c
*** c-decl.c	3 Sep 2003 14:57:28 -0000	1.441
--- c-decl.c	4 Sep 2003 17:19:01 -0000
***************
*** 505,511 ****
    tree decl;
    tree p;
  
!   scope->function_body |= functionbody;
  
    if (keep == KEEP_MAYBE)
      keep = (scope->names || scope->tags);
--- 505,512 ----
    tree decl;
    tree p;
  
!   /* The following line does not use |= due to a bug in HP's C compiler */
!   scope->function_body = scope->function_body | functionbody;
  
    if (keep == KEEP_MAYBE)
      keep = (scope->names || scope->tags);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]