--- deliantra/server/include/compiler.h 2010/01/16 00:45:45 1.5 +++ deliantra/server/include/compiler.h 2011/05/26 16:11:21 1.12 @@ -1,7 +1,7 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * Copyright (©) 2009,2010,2011 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * * Deliantra is free software: you can redistribute it and/or modify it under * the terms of the Affero GNU General Public License as published by the @@ -49,6 +49,11 @@ # define decltype(x) typeof(x) #endif +#define func_const attribute ((const)) +#define func_pure attribute ((pure)) +#define func_hot attribute ((hot)) // 4.x +#define func_cold attribute ((cold)) // 4.x + #if GCC_VERSION(4,5) # define unreachable() __builtin_unreachable () #else @@ -63,7 +68,7 @@ #define expect_false(expr) expect ((expr) ? 1 : 0, 0) #define expect_true(expr) expect ((expr) ? 1 : 0, 1) -// try to tell the compiler tat some condition is definitely true +// try to tell the compiler that some condition is definitely true #define assume(cond) do { if (!(cond)) unreachable (); } while (0) #endif