X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Flexer%2Fq2c.c;h=f187d2427faa283eef324a2c3ba09159468b0e54;hb=10add4c7fbb4076b69e27c524e24081067c39f40;hp=4ba008fa3cacc668d9cb7374cf940dbf0e6378bf;hpb=97f42446114868d90817dfb335b008097c6c2276;p=pspp-builds.git diff --git a/src/language/lexer/q2c.c b/src/language/lexer/q2c.c index 4ba008fa..f187d242 100644 --- a/src/language/lexer/q2c.c +++ b/src/language/lexer/q2c.c @@ -16,8 +16,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include - #include #include #include @@ -28,11 +26,26 @@ #include #include -#include -#include +/* GNU C allows the programmer to declare that certain functions take + printf-like arguments, never return, etc. Conditionalize these + declarations on whether gcc is in use. */ +#if __GNUC__ > 1 +#define ATTRIBUTE(X) __attribute__ (X) +#else +#define ATTRIBUTE(X) +#endif + +/* Marks a function argument as possibly not used. */ +#define UNUSED ATTRIBUTE ((unused)) + +/* Marks a function that will never return. */ +#define NO_RETURN ATTRIBUTE ((noreturn)) + +/* Mark a function as taking a printf- or scanf-like format + string as its FMT'th argument and that the FIRST'th argument + is the first one to be checked against the format string. */ +#define PRINTF_FORMAT(FMT, FIRST) ATTRIBUTE ((format (__printf__, FMT, FIRST))) -#include "exit.h" - /* Max length of an input line. */ #define MAX_LINE_LEN 1024 @@ -1322,7 +1335,7 @@ dump_vars_init (int persistent) break; default: - NOT_REACHED (); + abort (); } } }