Commit b649398a by Zack Weinberg Committed by Zack Weinberg

ansidecl.h: Reorganize for readability...

include:
        * ansidecl.h: Reorganize for readability, remove documentation
        of obsolete macros, document PARAMS and VPARAMS.  Add new
        macros VA_OPEN, VA_CLOSE, and VA_FIXEDARG for nicer variadic
        function implementation.

gcc:
        * cpperror.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.

From-SVN: r45011
parent 76f4925a
2001-08-18 Zack Weinberg <zackw@panix.com> 2001-08-18 Zack Weinberg <zackw@panix.com>
* cpperror.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
2001-08-18 Zack Weinberg <zackw@panix.com>
* haifa-sched.c: Convert to target hooks. Macros replaced * haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT, are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE, MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
......
...@@ -142,22 +142,14 @@ _cpp_begin_message (pfile, code, pos) ...@@ -142,22 +142,14 @@ _cpp_begin_message (pfile, code, pos)
void void
cpp_ice VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) cpp_ice VPARAMS ((cpp_reader *pfile, const char *msgid, ...))
{ {
#ifndef ANSI_PROTOTYPES VA_OPEN (ap, msgid);
cpp_reader *pfile; VA_FIXEDARG (ap, cpp_reader *, pfile);
const char *msgid; VA_FIXEDARG (ap, const char *, msgid);
#endif
va_list ap;
VA_START (ap, msgid);
#ifndef ANSI_PROTOTYPES
pfile = va_arg (ap, cpp_reader *);
msgid = va_arg (ap, const char *);
#endif
if (_cpp_begin_message (pfile, ICE, 0)) if (_cpp_begin_message (pfile, ICE, 0))
v_message (msgid, ap); v_message (msgid, ap);
va_end(ap);
VA_CLOSE (ap);
} }
/* Same as cpp_error, except we consider the error to be "fatal", /* Same as cpp_error, except we consider the error to be "fatal",
...@@ -169,72 +161,47 @@ cpp_ice VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) ...@@ -169,72 +161,47 @@ cpp_ice VPARAMS ((cpp_reader *pfile, const char *msgid, ...))
void void
cpp_fatal VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) cpp_fatal VPARAMS ((cpp_reader *pfile, const char *msgid, ...))
{ {
#ifndef ANSI_PROTOTYPES VA_OPEN (ap, msgid);
cpp_reader *pfile; VA_FIXEDARG (ap, cpp_reader *, pfile);
const char *msgid; VA_FIXEDARG (ap, const char *, msgid);
#endif
va_list ap;
VA_START (ap, msgid);
#ifndef ANSI_PROTOTYPES
pfile = va_arg (ap, cpp_reader *);
msgid = va_arg (ap, const char *);
#endif
if (_cpp_begin_message (pfile, FATAL, 0)) if (_cpp_begin_message (pfile, FATAL, 0))
v_message (msgid, ap); v_message (msgid, ap);
va_end(ap);
VA_CLOSE (ap);
} }
void void
cpp_error VPARAMS ((cpp_reader * pfile, const char *msgid, ...)) cpp_error VPARAMS ((cpp_reader * pfile, const char *msgid, ...))
{ {
#ifndef ANSI_PROTOTYPES VA_OPEN (ap, msgid);
cpp_reader *pfile; VA_FIXEDARG (ap, cpp_reader *, pfile);
const char *msgid; VA_FIXEDARG (ap, const char *, msgid);
#endif
va_list ap;
VA_START(ap, msgid);
#ifndef ANSI_PROTOTYPES
pfile = va_arg (ap, cpp_reader *);
msgid = va_arg (ap, const char *);
#endif
if (_cpp_begin_message (pfile, ERROR, 0)) if (_cpp_begin_message (pfile, ERROR, 0))
v_message (msgid, ap); v_message (msgid, ap);
va_end(ap);
VA_CLOSE (ap);
} }
void void
cpp_error_with_line VPARAMS ((cpp_reader *pfile, int line, int column, cpp_error_with_line VPARAMS ((cpp_reader *pfile, int line, int column,
const char *msgid, ...)) const char *msgid, ...))
{ {
#ifndef ANSI_PROTOTYPES
cpp_reader *pfile;
int line;
int column;
const char *msgid;
#endif
va_list ap;
cpp_lexer_pos pos; cpp_lexer_pos pos;
VA_START (ap, msgid); VA_OPEN (ap, msgid);
VA_FIXEDARG (ap, cpp_reader *, pfile);
#ifndef ANSI_PROTOTYPES VA_FIXEDARG (ap, int, line);
pfile = va_arg (ap, cpp_reader *); VA_FIXEDARG (ap, int, column);
line = va_arg (ap, int); VA_FIXEDARG (ap, const char *, msgid);
column = va_arg (ap, int);
msgid = va_arg (ap, const char *);
#endif
pos.line = line; pos.line = line;
pos.col = column; pos.col = column;
if (_cpp_begin_message (pfile, ERROR, &pos)) if (_cpp_begin_message (pfile, ERROR, &pos))
v_message (msgid, ap); v_message (msgid, ap);
va_end(ap);
VA_CLOSE (ap);
} }
/* Error including a message from `errno'. */ /* Error including a message from `errno'. */
...@@ -249,127 +216,83 @@ cpp_error_from_errno (pfile, name) ...@@ -249,127 +216,83 @@ cpp_error_from_errno (pfile, name)
void void
cpp_warning VPARAMS ((cpp_reader * pfile, const char *msgid, ...)) cpp_warning VPARAMS ((cpp_reader * pfile, const char *msgid, ...))
{ {
#ifndef ANSI_PROTOTYPES VA_OPEN (ap, msgid);
cpp_reader *pfile; VA_FIXEDARG (ap, cpp_reader *, pfile);
const char *msgid; VA_FIXEDARG (ap, const char *, msgid);
#endif
va_list ap;
VA_START (ap, msgid);
#ifndef ANSI_PROTOTYPES
pfile = va_arg (ap, cpp_reader *);
msgid = va_arg (ap, const char *);
#endif
if (_cpp_begin_message (pfile, WARNING, 0)) if (_cpp_begin_message (pfile, WARNING, 0))
v_message (msgid, ap); v_message (msgid, ap);
va_end(ap);
VA_CLOSE (ap);
} }
void void
cpp_warning_with_line VPARAMS ((cpp_reader * pfile, int line, int column, cpp_warning_with_line VPARAMS ((cpp_reader * pfile, int line, int column,
const char *msgid, ...)) const char *msgid, ...))
{ {
#ifndef ANSI_PROTOTYPES
cpp_reader *pfile;
int line;
int column;
const char *msgid;
#endif
va_list ap;
cpp_lexer_pos pos; cpp_lexer_pos pos;
VA_START (ap, msgid); VA_OPEN (ap, msgid);
VA_FIXEDARG (ap, cpp_reader *, pfile);
#ifndef ANSI_PROTOTYPES VA_FIXEDARG (ap, int, line);
pfile = va_arg (ap, cpp_reader *); VA_FIXEDARG (ap, int, column);
line = va_arg (ap, int); VA_FIXEDARG (ap, const char *, msgid);
column = va_arg (ap, int);
msgid = va_arg (ap, const char *);
#endif
pos.line = line; pos.line = line;
pos.col = column; pos.col = column;
if (_cpp_begin_message (pfile, WARNING, &pos)) if (_cpp_begin_message (pfile, WARNING, &pos))
v_message (msgid, ap); v_message (msgid, ap);
va_end(ap);
VA_CLOSE (ap);
} }
void void
cpp_pedwarn VPARAMS ((cpp_reader * pfile, const char *msgid, ...)) cpp_pedwarn VPARAMS ((cpp_reader * pfile, const char *msgid, ...))
{ {
#ifndef ANSI_PROTOTYPES VA_OPEN (ap, msgid);
cpp_reader *pfile; VA_FIXEDARG (ap, cpp_reader *, pfile);
const char *msgid; VA_FIXEDARG (ap, const char *, msgid);
#endif
va_list ap;
VA_START (ap, msgid);
#ifndef ANSI_PROTOTYPES
pfile = va_arg (ap, cpp_reader *);
msgid = va_arg (ap, const char *);
#endif
if (_cpp_begin_message (pfile, PEDWARN, 0)) if (_cpp_begin_message (pfile, PEDWARN, 0))
v_message (msgid, ap); v_message (msgid, ap);
va_end(ap);
VA_CLOSE (ap);
} }
void void
cpp_pedwarn_with_line VPARAMS ((cpp_reader * pfile, int line, int column, cpp_pedwarn_with_line VPARAMS ((cpp_reader * pfile, int line, int column,
const char *msgid, ...)) const char *msgid, ...))
{ {
#ifndef ANSI_PROTOTYPES
cpp_reader *pfile;
int line;
int column;
const char *msgid;
#endif
va_list ap;
cpp_lexer_pos pos; cpp_lexer_pos pos;
VA_START (ap, msgid); VA_OPEN (ap, msgid);
VA_FIXEDARG (ap, cpp_reader *, pfile);
#ifndef ANSI_PROTOTYPES VA_FIXEDARG (ap, int, line);
pfile = va_arg (ap, cpp_reader *); VA_FIXEDARG (ap, int, column);
line = va_arg (ap, int); VA_FIXEDARG (ap, const char *, msgid);
column = va_arg (ap, int);
msgid = va_arg (ap, const char *);
#endif
pos.line = line; pos.line = line;
pos.col = column; pos.col = column;
if (_cpp_begin_message (pfile, PEDWARN, &pos)) if (_cpp_begin_message (pfile, PEDWARN, &pos))
v_message (msgid, ap); v_message (msgid, ap);
va_end(ap);
VA_CLOSE (ap);
} }
/* Print an error message not associated with a file. */ /* Print an error message not associated with a file. */
void void
cpp_notice VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) cpp_notice VPARAMS ((cpp_reader *pfile, const char *msgid, ...))
{ {
#ifndef ANSI_PROTOTYPES VA_OPEN (ap, msgid);
cpp_reader *pfile; VA_FIXEDARG (ap, cpp_reader *, pfile);
const char *msgid; VA_FIXEDARG (ap, const char *, msgid);
#endif
va_list ap;
VA_START (ap, msgid);
#ifndef ANSI_PROTOTYPES
pfile = va_arg (ap, cpp_reader *);
msgid = va_arg (ap, const char *);
#endif
if (pfile->errors < CPP_FATAL_LIMIT) if (pfile->errors < CPP_FATAL_LIMIT)
pfile->errors++; pfile->errors++;
vfprintf (stderr, _(msgid), ap); v_message (msgid, ap);
putc('\n', stderr);
va_end(ap); VA_CLOSE (ap);
} }
void void
......
2001-08-18 Zack Weinberg <zackw@panix.com>
* ansidecl.h: Reorganize for readability, remove documentation
of obsolete macros, document PARAMS and VPARAMS. Add new
macros VA_OPEN, VA_CLOSE, and VA_FIXEDARG for nicer variadic
function implementation.
2001-08-16 Richard Henderson <rth@redhat.com> 2001-08-16 Richard Henderson <rth@redhat.com>
* hashtab.h (htab_hash_string): Declare. * hashtab.h (htab_hash_string): Declare.
......
/* ANSI and traditional C compatability macros /* ANSI and traditional C compatability macros
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000 Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
...@@ -21,164 +21,214 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ...@@ -21,164 +21,214 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
ANSI C is assumed if __STDC__ is #defined. ANSI C is assumed if __STDC__ is #defined.
Macro ANSI C definition Traditional C definition Macro ANSI C definition Traditional C definition
----- ---- - ---------- ----------- - ---------- ----- ---- - ---------- ----------- - ----------
PTR `void *' `char *' ANSI_PROTOTYPES 1 not defined
LONG_DOUBLE `long double' `double' PTR `void *' `char *'
VOLATILE `volatile' `' PTRCONST `void *const' `char *'
SIGNED `signed' `' LONG_DOUBLE `long double' `double'
PTRCONST `void *const' `char *' const not defined `'
ANSI_PROTOTYPES 1 not defined volatile not defined `'
signed not defined `'
CONST is also defined, but is obsolete. Just use const. VA_START(ap, var) va_start(ap, var) va_start(ap)
obsolete -- DEFUN (name, arglist, args) Note that it is safe to write "void foo();" indicating a function
with no return value, in all K+R compilers we have been able to test.
Defines function NAME.
For declaring functions with prototypes, we also provide these:
ARGLIST lists the arguments, separated by commas and enclosed in
parentheses. ARGLIST becomes the argument list in traditional C. PARAMS ((prototype))
-- for functions which take a fixed number of arguments. Use this
ARGS list the arguments with their types. It becomes a prototype in when declaring the function. When defining the function, write a
ANSI C, and the type declarations in traditional C. Arguments should K+R style argument list. For example:
be separated with `AND'. For functions with a variable number of
arguments, the last thing listed should be `DOTS'. char *strcpy PARAMS ((char *dest, char *source));
...
obsolete -- DEFUN_VOID (name) char *
strcpy (dest, source)
Defines a function NAME, which takes no arguments. char *dest;
char *source;
obsolete -- EXFUN (name, (prototype)) -- obsolete. { ... }
Replaced by PARAMS. Do not use; will disappear someday soon.
Was used in external function declarations. VPARAMS ((prototype, ...))
In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in -- for functions which take a variable number of arguments. Use
parentheses). In traditional C it is `NAME()'. PARAMS to declare the function, VPARAMS to define it. For example:
For a function that takes no arguments, PROTOTYPE should be `(void)'.
int printf PARAMS ((const char *format, ...));
obsolete -- PROTO (type, name, (prototype) -- obsolete. ...
int
This one has also been replaced by PARAMS. Do not use. printf VPARAMS ((const char *format, ...))
{
PARAMS ((args)) ...
}
We could use the EXFUN macro to handle prototype declarations, but
the name is misleading and the result is ugly. So we just define a For writing functions which take variable numbers of arguments, we
simple macro to handle the parameter lists, as in: also provide the VA_OPEN, VA_CLOSE, and VA_FIXEDARG macros. These
hide the differences between K+R <varargs.h> and C89 <stdarg.h> more
static int foo PARAMS ((int, char)); thoroughly than the simple VA_START() macro mentioned above.
This produces: `static int foo();' or `static int foo (int, char);' VA_OPEN and VA_CLOSE are used *instead of* va_start and va_end.
Immediately after VA_OPEN, put a sequence of VA_FIXEDARG calls
EXFUN would have done it like this: corresponding to the list of fixed arguments. Then use va_arg
normally to get the variable arguments, or pass your va_list object
static int EXFUN (foo, (int, char)); around. You do not declare the va_list yourself; VA_OPEN does it
for you.
but the function is not external...and it's hard to visually parse
the function name out of the mess. EXFUN should be considered Here is a complete example:
obsolete; new code should be written to use PARAMS.
int
DOTS is also obsolete. printf VPARAMS ((const char *format, ...))
{
Examples: int result;
extern int printf PARAMS ((const char *format, ...)); VA_OPEN (ap, format);
*/ VA_FIXEDARG (ap, const char *, format);
result = vfprintf (stdout, format, ap);
VA_CLOSE (ap);
return result;
}
You can declare variables either before or after the VA_OPEN,
VA_FIXEDARG sequence. You can _not_ put statements before VA_OPEN.
Also, VA_OPEN and VA_CLOSE are the beginning and end of a block.
They must appear at the same nesting level, and any variables
declared after VA_OPEN go out of scope at VA_CLOSE. Unfortunately,
with a K+R compiler, that includes the argument list.
For ease of writing code which uses GCC extensions but needs to be
portable to other compilers, we provide the GCC_VERSION macro that
simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
wrappers around __attribute__. Also, __extension__ will be #defined
to nothing if it doesn't work. See below.
This header also defines a lot of obsolete macros:
CONST, VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID,
AND, DOTS, NOARGS. Don't use them. */
#ifndef _ANSIDECL_H #ifndef _ANSIDECL_H
#define _ANSIDECL_H 1
#define _ANSIDECL_H 1
/* Every source file includes this file, /* Every source file includes this file,
so they will all get the switch for lint. */ so they will all get the switch for lint. */
/* LINTLIBRARY */ /* LINTLIBRARY */
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
older preprocessors. Thus we can't define something like this:
#define HAVE_GCC_VERSION(MAJOR, MINOR) \
(__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
and then test "#if HAVE_GCC_VERSION(2,7)".
So instead we use the macro below and test it against specific values. */
/* This macro simplifies testing whether we are using gcc, and if it
is of a particular minimum version. (Both major & minor numbers are
significant.) This macro will evaluate to 0 if we are not using
gcc at all. */
#ifndef GCC_VERSION
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#endif /* GCC_VERSION */
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
/* All known AIX compilers implement these things (but don't always /* All known AIX compilers implement these things (but don't always
define __STDC__). The RISC/OS MIPS compiler defines these things define __STDC__). The RISC/OS MIPS compiler defines these things
in SVR4 mode, but does not define __STDC__. */ in SVR4 mode, but does not define __STDC__. */
#define PTR void * #define ANSI_PROTOTYPES 1
#define PTRCONST void *CONST #define PTR void *
#define LONG_DOUBLE long double #define PTRCONST void *const
#define LONG_DOUBLE long double
#ifndef IN_GCC
#define AND , #define PARAMS(ARGS) ARGS
#define NOARGS void #define VPARAMS(ARGS) ARGS
#define VOLATILE volatile #define VA_START(VA_LIST, VAR) va_start(VA_LIST, VAR)
#define SIGNED signed
#endif /* ! IN_GCC */ /* variadic function helper macros */
/* "struct Qdmy" swallows the semicolon after VA_OPEN/VA_FIXEDARG's
#define PARAMS(paramlist) paramlist use without inhibiting further decls and without declaring an
#define ANSI_PROTOTYPES 1 actual variable. */
#define VA_OPEN(AP, VAR) va_list AP; va_start(AP, VAR); { struct Qdmy
#define VPARAMS(ARGS) ARGS #define VA_CLOSE(AP) } va_end(AP)
#define VA_START(va_list,var) va_start(va_list,var) #define VA_FIXEDARG(AP, T, N) struct Qdmy
#undef const
#undef volatile
#undef signed
/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
it too, but it's not in C89. */
#undef inline
#if __STDC_VERSION__ > 199901L
/* it's a keyword */
#else
# if GCC_VERSION >= 2007
# define inline __inline__ /* __inline__ prevents -pedantic warnings */
# else
# define inline /* nothing */
# endif
#endif
/* These are obsolete. Do not use. */ /* These are obsolete. Do not use. */
#ifndef IN_GCC #ifndef IN_GCC
#define CONST const #define CONST const
#define DOTS , ... #define VOLATILE volatile
#define SIGNED signed
#define PROTO(type, name, arglist) type name arglist #define PROTO(type, name, arglist) type name arglist
#define EXFUN(name, proto) name proto #define EXFUN(name, proto) name proto
#define DEFUN(name, arglist, args) name(args) #define DEFUN(name, arglist, args) name(args)
#define DEFUN_VOID(name) name(void) #define DEFUN_VOID(name) name(void)
#define AND ,
#define DOTS , ...
#define NOARGS void
#endif /* ! IN_GCC */ #endif /* ! IN_GCC */
#else /* Not ANSI C. */ #else /* Not ANSI C. */
#define PTR char * #undef ANSI_PROTOTYPES
#define PTRCONST PTR #define PTR char *
#define LONG_DOUBLE double #define PTRCONST PTR
#define LONG_DOUBLE double
#define PARAMS(args) ()
#define VPARAMS(args) (va_alist) va_dcl
#define VA_START(va_list, var) va_start(va_list)
#define VA_OPEN(AP, VAR) va_list AP; va_start(AP); { struct Qdmy
#define VA_CLOSE(AP) } va_end(AP)
#define VA_FIXEDARG(AP, TYPE, NAME) TYPE NAME = va_arg(AP, TYPE)
/* some systems define these in header files for non-ansi mode */
#undef const
#undef volatile
#undef signed
#undef inline
#define const
#define volatile
#define signed
#define inline
#ifndef IN_GCC #ifndef IN_GCC
#define AND ;
#define NOARGS
#define VOLATILE
#define SIGNED
#endif /* !IN_GCC */
#ifndef const /* some systems define it in header files for non-ansi mode */
#define const
#endif
#define PARAMS(paramlist) ()
#define VPARAMS(ARGS) (va_alist) va_dcl
#define VA_START(va_list,var) va_start(va_list)
/* These are obsolete. Do not use. */
#ifndef IN_GCC
#define CONST #define CONST
#define DOTS #define VOLATILE
#define SIGNED
#define PROTO(type, name, arglist) type name () #define PROTO(type, name, arglist) type name ()
#define EXFUN(name, proto) name() #define EXFUN(name, proto) name()
#define DEFUN(name, arglist, args) name arglist args; #define DEFUN(name, arglist, args) name arglist args;
#define DEFUN_VOID(name) name() #define DEFUN_VOID(name) name()
#define AND ;
#define DOTS
#define NOARGS
#endif /* ! IN_GCC */ #endif /* ! IN_GCC */
#endif /* ANSI C. */ #endif /* ANSI C. */
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
older preprocessors. Thus we can't define something like this:
#define HAVE_GCC_VERSION(MAJOR, MINOR) \
(__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
and then test "#if HAVE_GCC_VERSION(2,7)".
So instead we use the macro below and test it against specific values. */
/* This macro simplifies testing whether we are using gcc, and if it
is of a particular minimum version. (Both major & minor numbers are
significant.) This macro will evaluate to 0 if we are not using
gcc at all. */
#ifndef GCC_VERSION
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#endif /* GCC_VERSION */
/* Define macros for some gcc attributes. This permits us to use the /* Define macros for some gcc attributes. This permits us to use the
macros freely, and know that they will come into play for the macros freely, and know that they will come into play for the
version of gcc in which they are supported. */ version of gcc in which they are supported. */
...@@ -229,20 +279,12 @@ So instead we use the macro below and test it against specific values. */ ...@@ -229,20 +279,12 @@ So instead we use the macro below and test it against specific values. */
#define __extension__ #define __extension__
#endif #endif
/* Bootstrap support: Autoconf will possibly define the `inline' or /* Bootstrap support: Adjust certain macros defined by Autoconf,
`const' keywords as macros, however this is only valid for the which are only valid for the stage1 compiler. If we detect
stage1 compiler. If we detect a modern version of gcc, a modern version of GCC, we are probably in stage2 or beyond,
unconditionally reset the values. This makes sure the right thing so unconditionally reset the values. Note that const, inline,
happens in stage2 and later. We need to do this very early; etc. have been dealt with above. */
i.e. before any header files that might use these keywords.
Otherwise conflicts might occur. */
#if (GCC_VERSION >= 2007) #if (GCC_VERSION >= 2007)
# ifdef __STDC__
# undef const
# endif
# undef inline
# define inline __inline__ /* __inline__ prevents -pedantic warnings */
# ifndef HAVE_LONG_DOUBLE # ifndef HAVE_LONG_DOUBLE
# define HAVE_LONG_DOUBLE 1 # define HAVE_LONG_DOUBLE 1
# endif # endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment