Patchwork [DOC] Fix up __builtin_ffs* args (PR c/50347)

login
register
mail settings
Submitter Marek Polacek
Date March 25, 2014, 8:59 p.m.
Message ID <20140325205938.GU6523@redhat.com>
Download mbox | patch
Permalink /patch/333709/
State New
Headers show

Comments

Marek Polacek - March 25, 2014, 8:59 p.m.
ffs builtins had wrong type of parameters.

2014-03-25  Marek Polacek  <polacek@redhat.com>

	PR c/50347
	* doc/extend.texi (ffs Builtins): Change unsigned types to signed
	types.


	Marek
Marek Polacek - March 27, 2014, 3:28 p.m.
Actually I suppose this is obvious enough, so will commit it today.

On Tue, Mar 25, 2014 at 09:59:39PM +0100, Marek Polacek wrote:
> ffs builtins had wrong type of parameters.
> 
> 2014-03-25  Marek Polacek  <polacek@redhat.com>
> 
> 	PR c/50347
> 	* doc/extend.texi (ffs Builtins): Change unsigned types to signed
> 	types.
> 
> diff --git gcc/doc/extend.texi gcc/doc/extend.texi
> index c0da713..cb28bc9 100644
> --- gcc/doc/extend.texi
> +++ gcc/doc/extend.texi
> @@ -8963,7 +8963,7 @@ Similar to @code{__builtin_nans}, except the return type is @code{float}.
>  Similar to @code{__builtin_nans}, except the return type is @code{long double}.
>  @end deftypefn
>  
> -@deftypefn {Built-in Function} int __builtin_ffs (unsigned int x)
> +@deftypefn {Built-in Function} int __builtin_ffs (int x)
>  Returns one plus the index of the least significant 1-bit of @var{x}, or
>  if @var{x} is zero, returns zero.
>  @end deftypefn
> @@ -8993,9 +8993,9 @@ Returns the parity of @var{x}, i.e.@: the number of 1-bits in @var{x}
>  modulo 2.
>  @end deftypefn
>  
> -@deftypefn {Built-in Function} int __builtin_ffsl (unsigned long)
> +@deftypefn {Built-in Function} int __builtin_ffsl (long)
>  Similar to @code{__builtin_ffs}, except the argument type is
> -@code{unsigned long}.
> +@code{long}.
>  @end deftypefn
>  
>  @deftypefn {Built-in Function} int __builtin_clzl (unsigned long)
> @@ -9023,9 +9023,9 @@ Similar to @code{__builtin_parity}, except the argument type is
>  @code{unsigned long}.
>  @end deftypefn
>  
> -@deftypefn {Built-in Function} int __builtin_ffsll (unsigned long long)
> +@deftypefn {Built-in Function} int __builtin_ffsll (long long)
>  Similar to @code{__builtin_ffs}, except the argument type is
> -@code{unsigned long long}.
> +@code{long long}.
>  @end deftypefn
>  
>  @deftypefn {Built-in Function} int __builtin_clzll (unsigned long long)
 
 	Marek

Patch

diff --git gcc/doc/extend.texi gcc/doc/extend.texi
index c0da713..cb28bc9 100644
--- gcc/doc/extend.texi
+++ gcc/doc/extend.texi
@@ -8963,7 +8963,7 @@  Similar to @code{__builtin_nans}, except the return type is @code{float}.
 Similar to @code{__builtin_nans}, except the return type is @code{long double}.
 @end deftypefn
 
-@deftypefn {Built-in Function} int __builtin_ffs (unsigned int x)
+@deftypefn {Built-in Function} int __builtin_ffs (int x)
 Returns one plus the index of the least significant 1-bit of @var{x}, or
 if @var{x} is zero, returns zero.
 @end deftypefn
@@ -8993,9 +8993,9 @@  Returns the parity of @var{x}, i.e.@: the number of 1-bits in @var{x}
 modulo 2.
 @end deftypefn
 
-@deftypefn {Built-in Function} int __builtin_ffsl (unsigned long)
+@deftypefn {Built-in Function} int __builtin_ffsl (long)
 Similar to @code{__builtin_ffs}, except the argument type is
-@code{unsigned long}.
+@code{long}.
 @end deftypefn
 
 @deftypefn {Built-in Function} int __builtin_clzl (unsigned long)
@@ -9023,9 +9023,9 @@  Similar to @code{__builtin_parity}, except the argument type is
 @code{unsigned long}.
 @end deftypefn
 
-@deftypefn {Built-in Function} int __builtin_ffsll (unsigned long long)
+@deftypefn {Built-in Function} int __builtin_ffsll (long long)
 Similar to @code{__builtin_ffs}, except the argument type is
-@code{unsigned long long}.
+@code{long long}.
 @end deftypefn
 
 @deftypefn {Built-in Function} int __builtin_clzll (unsigned long long)