[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compiling Bison with non-GNU compiler
From: |
Lee Kindness |
Subject: |
Compiling Bison with non-GNU compiler |
Date: |
Tue, 9 Oct 2001 12:34:26 +0100 (BST) |
When compiling Bison 1.29 on AIX 4.3.3 the use of the __attribute__
function of GCC causes the build to fail. This should be conditionally
used if the compiler is GCC. The following patch corrects complain.h:
*** complain.h Tue Nov 7 16:28:46 2000
--- complain.h Tue Oct 9 12:29:05 2001
***************
*** 28,44 ****
/* Informative messages, but we proceed. */
extern void warn (const char *format, ...)
! __attribute__ ((__format__ (__printf__, 1, 2)));
/* Something bad happen, but let's continue and die later. */
extern void complain (const char *format, ...)
! __attribute__ ((__format__ (__printf__, 1, 2)));
/* Something bad happen and we die now. */
extern void fatal (const char *format, ...)
! __attribute__ ((__format__ (__printf__, 1, 2)));
/* Print a message with `fprintf (stderr, FORMAT, ...)';
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
--- 28,53 ----
/* Informative messages, but we proceed. */
extern void warn (const char *format, ...)
! #ifdef __GNUC__
! __attribute__ ((__format__ (__printf__, 1, 2)))
! #endif
! ;
/* Something bad happen, but let's continue and die later. */
extern void complain (const char *format, ...)
! #ifdef __GNUC__
! __attribute__ ((__format__ (__printf__, 1, 2)))
! #endif
! ;
/* Something bad happen and we die now. */
extern void fatal (const char *format, ...)
! #ifdef __GNUC__
! __attribute__ ((__format__ (__printf__, 1, 2)))
! #endif
! ;
/* Print a message with `fprintf (stderr, FORMAT, ...)';
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
***************
*** 46,52 ****
extern void error (int status, int errnum,
const char *format, ...)
! __attribute__ ((__format__ (__printf__, 3, 4)));
#else
void warn ();
--- 55,64 ----
extern void error (int status, int errnum,
const char *format, ...)
! #ifdef __GNUC__
! __attribute__ ((__format__ (__printf__, 3, 4)))
! #endif
! ;
#else
void warn ();
- Compiling Bison with non-GNU compiler,
Lee Kindness <=