[Bug c/67668] erroneous type argument for unary operator one's complement

2015-09-22 Thread ka_bena at yahoo dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67668

--- Comment #4 from BENAÏSSA  ---
  Thank you for your quick and clear reply .
  Note:
   I think that using the same symbol operator for doing two different things
   can be a potential source of blind errors.
   I confirm that this is only a personnal point of view.
  A.Benaïssa



 Le Lundi 21 septembre 2015 15h41, manu at gcc dot gnu.org
 a écrit :


 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67668

Manuel López-Ibáñez  changed:

          What    |Removed                    |Added

            Status|UNCONFIRMED                |RESOLVED
                CC|                            |manu at gcc dot gnu.org
        Resolution|---                        |INVALID

--- Comment #3 from Manuel López-Ibáñez  ---
Marc is right:

The operator ‘~’ performs complex conjugation when used on a value with a
complex type. This is a GNU extension; for values of floating type, you should
use the ISO C99 functions conjf, conj and conjl, declared in  and
also provided as built-in functions by GCC. 

test.c:3:3: warning: ISO C does not support ‘~’ for complex conjugation
[-Wpedantic]
  ~( 1. + 0.i ) ; 
  ^

[Bug c/67668] erroneous type argument for unary operator one's complement

2015-09-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67668

--- Comment #1 from Jonathan Wakely  ---
*** Bug 67667 has been marked as a duplicate of this bug. ***


[Bug c/67668] erroneous type argument for unary operator one's complement

2015-09-21 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67668

--- Comment #2 from Marc Glisse  ---
https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/Complex.html
-Wpedantic

What is your question exactly?


[Bug c/67668] erroneous type argument for unary operator one's complement

2015-09-21 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67668

Manuel López-Ibáñez  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||manu at gcc dot gnu.org
 Resolution|--- |INVALID

--- Comment #3 from Manuel López-Ibáñez  ---
Marc is right:

The operator ‘~’ performs complex conjugation when used on a value with a
complex type. This is a GNU extension; for values of floating type, you should
use the ISO C99 functions conjf, conj and conjl, declared in  and
also provided as built-in functions by GCC. 

test.c:3:3: warning: ISO C does not support ‘~’ for complex conjugation
[-Wpedantic]
   ~( 1. + 0.i ) ; 
   ^