1) The error attribute appeared in gcc-4.3
2) The return type of __builtin_constant_p is int
3) Sun Studio 12.0 and later builtin support for __builtin_constant_p
Found by Tinderbox.
Signed-off-by: Jeremy Huddleston
---
include/misc.h | 14 +-
1 files changed, 9 insertions(+), 5 d
On Thu, Sep 22, 2011 at 10:11 PM, Jeremy Huddleston wrote:
> 1) The error attribute appeared in gcc-4.3
> 2) The return type of __builtin_constant_p is int
> 3) Sun Studio 12.0 and later builtin support for __builtin_constant_p
>
> Found by Tinderbox.
>
> Signed-off-by: Jeremy Huddleston
> ---
>
On 09/22/11 07:11 PM, Jeremy Huddleston wrote:
-static inline void __builtin_constant_p(int x)
+static inline int constant_p(int x)
{
+#if defined(__GNUC__) || (defined(__SUNPRO_C)&& (__SUNPRO_C>= 0x590))
+ return __builtin_constant_p(x);
+#else
return 0;
-}
#endif
+}
Since _
On Sep 22, 2011, at 19:49, Alan Coopersmith wrote:
> On 09/22/11 07:11 PM, Jeremy Huddleston wrote:
>> -static inline void __builtin_constant_p(int x)
>> +static inline int constant_p(int x)
>> {
>> +#if defined(__GNUC__) || (defined(__SUNPRO_C)&& (__SUNPRO_C>= 0x590))
>> +return __builtin_
On 09/22/11 07:49 PM, Alan Coopersmith wrote:
On 09/22/11 07:11 PM, Jeremy Huddleston wrote:
-static inline void __builtin_constant_p(int x)
+static inline int constant_p(int x)
{
+#if defined(__GNUC__) || (defined(__SUNPRO_C)&& (__SUNPRO_C>= 0x590))
+ return __builtin_constant_p(x);
+#else
retu
On 09/22/11 07:58 PM, Jeremy Huddleston wrote:
On Sep 22, 2011, at 19:49, Alan Coopersmith wrote:
On 09/22/11 07:11 PM, Jeremy Huddleston wrote:
-static inline void __builtin_constant_p(int x)
+static inline int constant_p(int x)
{
+#if defined(__GNUC__) || (defined(__SUNPRO_C)&& (__SUNPR
Reviewed-by: Jamey Sharp
What I said for Alan's patch goes for this one too:
Seems like there ought to be a better way than listing which compilers
support it, though. I considered an autoconf test to check whether
__builtin_constant_p is defined, but that doesn't tell you which
compiler is pull
On 09/22/11 08:23 PM, Jamey Sharp wrote:
Reviewed-by: Jamey Sharp
What I said for Alan's patch goes for this one too:
Seems like there ought to be a better way than listing which compilers
support it, though. I considered an autoconf test to check whether
__builtin_constant_p is defined, but th
On Sep 22, 2011, at 20:23, Jamey Sharp wrote:
> Reviewed-by: Jamey Sharp
>
> What I said for Alan's patch goes for this one too:
>
> Seems like there ought to be a better way than listing which compilers
> support it, though. I considered an autoconf test to check whether
> __builtin_constant_
On Thu, 22 Sep 2011 19:49:18 -0700, Alan Coopersmith
wrote:
> Since __builtin_constant_p is more of a keyword than a function, does the
> magic still work when you have the extra level of indirection?
Could just be a macro if necessary. Either seems fine to me.
--
keith.pack...@intel.com
pg
On Thu, 22 Sep 2011 21:55:34 -0700, Jeremy Huddleston
wrote:
> Yeah, I'm certainly in favor of "something better" but for now, I
> settle for "something working" =/
Do we have 'something working' at this point? I don't see an obvious
resolution in this thread.
--
keith.pack...@intel.com
pgp
It's in my [PULL] request.
http://cgit.freedesktop.org/~jeremyhu/xserver/commit/?h=for-keith&id=206b30ebc608d29a91cc18665d89e887cac4dba3
On Oct 3, 2011, at 11:43, Keith Packard wrote:
> On Thu, 22 Sep 2011 21:55:34 -0700, Jeremy Huddleston
> wrote:
>
>> Yeah, I'm certainly in favor of "someth
12 matches
Mail list logo