(svn r23588) -Codechange: use the 'final' keyword so compiler can optimise out some indirect calls
This commit is contained in:
@@ -128,6 +128,11 @@
|
||||
/* Warn about functions using 'printf' format syntax. First argument determines which parameter
|
||||
* is the format string, second argument is start of values passed to printf. */
|
||||
#define WARN_FORMAT(string, args) __attribute__ ((format (printf, string, args)))
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
|
||||
#define FINAL final
|
||||
#else
|
||||
#define FINAL
|
||||
#endif
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#if defined(__WATCOMC__)
|
||||
@@ -136,6 +141,7 @@
|
||||
#define CDECL
|
||||
#define GCC_PACK
|
||||
#define WARN_FORMAT(string, args)
|
||||
#define FINAL
|
||||
#include <malloc.h>
|
||||
#endif /* __WATCOMC__ */
|
||||
|
||||
@@ -176,7 +182,6 @@
|
||||
#pragma warning(disable: 6031) // code analyzer: Return value ignored: 'ReadFile'
|
||||
#pragma warning(disable: 6255) // code analyzer: _alloca indicates failure by raising a stack overflow exception. Consider using _malloca instead
|
||||
#pragma warning(disable: 6246) // code analyzer: Local declaration of 'statspec' hides declaration of the same name in outer scope. For additional information, see previous declaration at ...
|
||||
#define WARN_FORMAT(string, args)
|
||||
|
||||
#include <malloc.h> // alloca()
|
||||
#define NORETURN __declspec(noreturn)
|
||||
@@ -188,6 +193,8 @@
|
||||
#endif
|
||||
|
||||
#define GCC_PACK
|
||||
#define WARN_FORMAT(string, args)
|
||||
#define FINAL sealed
|
||||
|
||||
int CDECL snprintf(char *str, size_t size, const char *format, ...) WARN_FORMAT(3, 4);
|
||||
#if defined(WINCE)
|
||||
|
Reference in New Issue
Block a user