X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fcompiler.h;h=07b36b8e24d0eb9266c7dfbdc82f6bf6b69f61d0;hb=caea04e274261b575c7a3c5d3742c2a9672a5c54;hp=563cc59b1e85b8a6d7d44bdba3e9414e4d17603d;hpb=43b1296aafe7582e7dbe6c2b6a8b478d7d9b0fcf;p=pspp diff --git a/src/libpspp/compiler.h b/src/libpspp/compiler.h index 563cc59b1e..07b36b8e24 100644 --- a/src/libpspp/compiler.h +++ b/src/libpspp/compiler.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2009, 2010, 2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -45,7 +45,7 @@ non-`NULL' pointer it returns cannot alias any other pointer valid when the function returns. */ #if __GNUC__ > 2 -#define MALLOC_LIKE ATTRIBUTE ((malloc)) +#define MALLOC_LIKE ATTRIBUTE ((__malloc__)) #else #define MALLOC_LIKE #endif @@ -77,4 +77,25 @@ #define PURE_FUNCTION #endif +/* This attribute indicates that the argument with the given + IDX must be a null pointer. IDX counts backward in the + argument list, so that 0 is the last argument, 1 is the + second-from-last argument, and so on. */ +#if __GNUC__ > 3 +#define SENTINEL(IDX) ATTRIBUTE ((sentinel(IDX))) +#else +#define SENTINEL(IDX) +#endif + + +/* This attribute indicates that the function should be compiled + with the specified LEVEL, regardless of what has been specified + on the command line */ +#if __GNUC__ > 3 +#define OPTIMIZE(LEVEL) ATTRIBUTE ((optimize(LEVEL))) +#else +#define OPTIMIZE(LEVEL) +#endif + + #endif /* compiler.h */