public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* Diff for as.h in gas to compile on hpux
@ 1996-05-13 15:05 Don Bowman
  0 siblings, 0 replies; only message in thread
From: Don Bowman @ 1996-05-13 15:05 UTC (permalink / raw)
  To: gas2

The change is actually neither mips nor hpux specific: notably,
the assert-mask had an odd-format I did not understand:

#define assert(p) ((P) ? 0 : (as_assert (...)))

which meant it evaluated to be 0, or the return of as_assert(),
instead of void.

The hp-ux 9.05 c-compiler did not like one of the uses of this,
which became:

 (blah) ? 0 : as_assert();

 or 0; after optimisation

The following diff against as.h just changes the assert macro
to be an if statement.


*** as.h@@/main/LATEST	Fri Mar 22 11:44:19 1996
--- as.h	Mon May 13 17:25:50 1996
***************
*** 121,127 ****
  
  #else
  
! #define assert(P) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0))
  #undef abort
  #define abort()		as_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
  
--- 121,127 ----
  
  #else
  
! #define assert(P) if (P) (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0)
  #undef abort
  #define abort()		as_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
  

--
 Don Bowman        **      bowman@waterloo.hp.com     **           519-883-3019 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-05-13 15:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-05-13 15:05 Diff for as.h in gas to compile on hpux Don Bowman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).