Article View: gnu.gcc.help
Article #53052incompatibility of use of abort in varargs.h on decstation
From: Mike Allen
Date: Mon, 23 Mar 1992 22:35
Date: Mon, 23 Mar 1992 22:35
41 lines
2493 bytes
2493 bytes
I am using gcc-2.0 on a decstation 5000/120, running ultrix 4.2. I am
using varargs, but there is an incompatibility. In
/usr/include/stdlib.h it says:
void abort( void );
but in /usr/local/lib/gcc-include/va-mips.h, the va_arg(list,mode)
macro puts abort on the right hand side of a "?:" type expression,
which generates a "void value not ignored as it ought to be" message
from gcc. I modified va-mips.h to read (abort (), (char*) 0) instead
of ((char*)abort ()) (patch follows). Is there a better solution?
-Thanks,
Michael
*** va-mips.h-dist Mon Mar 23 16:29:23 1992
--- va-mips.h Mon Mar 23 16:30:20 1992
*************** typedef struct
*** 106,112 ****
(list).stack =(char *)\
(((int)((list).stack)\
+ 2*8 - 1) & -8) \
! ):(char *)abort()))\
:((list).pnt = (((list).pnt >=0) ? ((list).pnt +1)\
:((list).pnt == -1) ? 2 :3),\
(list).stack = (char *)(((int)((list).stack)+ 2*4 - 1) & -4)\
--- 106,112 ----
(list).stack =(char *)\
(((int)((list).stack)\
+ 2*8 - 1) & -8) \
! ):(abort(),(char*)0)))\
:((list).pnt = (((list).pnt >=0) ? ((list).pnt +1)\
:((list).pnt == -1) ? 2 :3),\
(list).stack = (char *)(((int)((list).stack)+ 2*4 - 1) & -4)\
--
===============================================================================
German Chancellor Helmut Kohl, on the inauguration of Germany's first
Holocaust memorial, saying Germans must never forget Nazi atrocities:
``(We) owe it to our children and grandchildren. We must pass on to
them the realization that it is not at all self-evident that one should
be allowed to live in peace and freedom.''
Technical Details
Message-ID:
<ALLEN.92Mar23163531@golem.ssc.gov>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!uwm.edu!linac!sunova!sunova.ssc.gov!allenShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,a2a740bc370820c9,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-03-23 14:35:31 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!uwm.edu!linac!sunova!sunova.ssc.gov!allen From: allen@golem.ssc.gov (Mike Allen) Subject: incompatibility of use of abort in varargs.h on decstation Message-ID: <ALLEN.92Mar23163531@golem.ssc.gov> Sender: usenet@sunova.ssc.gov (News Admin) Nntp-Posting-Host: golem.ssc.gov Reply-To: Michael_Allen@ssc.gov Organization: SSC Laboratory, Dallas, TX Distribution: gnu Date: Mon, 23 Mar 1992 22:35:31 GMT