public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/33193] slopiness in __real/__imag
       [not found] <bug-33193-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-18 16:26 ` froydnj at gcc dot gnu.org
  2010-11-18 16:34 ` froydnj at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: froydnj at gcc dot gnu.org @ 2010-11-18 16:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33193

--- Comment #4 from Nathan Froyd <froydnj at gcc dot gnu.org> 2010-11-18 16:25:04 UTC ---
Author: froydnj
Date: Thu Nov 18 16:24:56 2010
New Revision: 166909

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166909
Log:
gcc/
    PR c/33193
    * c-typeck.c (build_unary_op): Call build_real_imag_expr for
    REALPART_EXPR and IMAGPART_EXPR.

gcc/c-family/
    PR c/33193
    * c-common.h (build_real_imag_expr): Declare.
    * c-semantics.c (build_real_imag_expr): Define.

gcc/cp/
    PR c/33193
    * typeck.c (cp_build_unary_op): Call build_real_imag_expr for
    REALPART_EXPR and IMAGPART_EXPR.

gcc/testsuite/
    PR c/33193
    * c-c++-common/pr33193.c: New test.


Added:
    trunk/gcc/testsuite/c-c++-common/pr33193.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.h
    trunk/gcc/c-family/c-semantics.c
    trunk/gcc/c-typeck.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/33193] slopiness in __real/__imag
       [not found] <bug-33193-4@http.gcc.gnu.org/bugzilla/>
  2010-11-18 16:26 ` [Bug c/33193] slopiness in __real/__imag froydnj at gcc dot gnu.org
@ 2010-11-18 16:34 ` froydnj at gcc dot gnu.org
  2010-11-18 17:22 ` sabre at nondot dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: froydnj at gcc dot gnu.org @ 2010-11-18 16:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33193

Nathan Froyd <froydnj at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |froydnj at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #5 from Nathan Froyd <froydnj at gcc dot gnu.org> 2010-11-18 16:26:07 UTC ---
Fixed on trunk.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/33193] slopiness in __real/__imag
       [not found] <bug-33193-4@http.gcc.gnu.org/bugzilla/>
  2010-11-18 16:26 ` [Bug c/33193] slopiness in __real/__imag froydnj at gcc dot gnu.org
  2010-11-18 16:34 ` froydnj at gcc dot gnu.org
@ 2010-11-18 17:22 ` sabre at nondot dot org
  2022-01-02  6:04 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: sabre at nondot dot org @ 2010-11-18 17:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33193

Chris Lattner <sabre at nondot dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #6 from Chris Lattner <sabre at nondot dot org> 2010-11-18 17:15:32 UTC ---
http://gcc.gnu.org/onlinedocs/gcc/Complex.html#Complex still does not
document what arguments are accepted to __real and __imag.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/33193] slopiness in __real/__imag
       [not found] <bug-33193-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2010-11-18 17:22 ` sabre at nondot dot org
@ 2022-01-02  6:04 ` pinskia at gcc dot gnu.org
  2022-01-03  1:50 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-02  6:04 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
             Status|REOPENED                    |ASSIGNED
           Keywords|                            |documentation

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Chris Lattner from comment #6)
> http://gcc.gnu.org/onlinedocs/gcc/Complex.html#Complex still does not
> document what arguments are accepted to __real and __imag.

I think the documentation is clear here though:
"a complex-valued expression exp".

This means the type that is accepted is "_Complex type", which can be prompted
from type.

Maybe we should add that scalar types can be prompted to _Complex types just to
make it fully clear what is allowed. Let me take a stab at that.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/33193] slopiness in __real/__imag
       [not found] <bug-33193-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2022-01-02  6:04 ` pinskia at gcc dot gnu.org
@ 2022-01-03  1:50 ` pinskia at gcc dot gnu.org
  2022-01-03 17:54 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-03  1:50 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2022-January
                   |                            |/587531.html
           Keywords|                            |patch

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Patch posted with the rewrite:
https://gcc.gnu.org/pipermail/gcc-patches/2022-January/587531.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/33193] slopiness in __real/__imag
       [not found] <bug-33193-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-01-03  1:50 ` pinskia at gcc dot gnu.org
@ 2022-01-03 17:54 ` cvs-commit at gcc dot gnu.org
  2022-01-03 17:55 ` pinskia at gcc dot gnu.org
  2022-02-01 17:23 ` sabre at nondot dot org
  7 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-03 17:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:4003ecbcedca2c36de762a8171b90a7969edce82

commit r12-6192-g4003ecbcedca2c36de762a8171b90a7969edce82
Author: Andrew Pinski <apinski@marvell.com>
Date:   Mon Jan 3 01:40:34 2022 +0000

    Revamp documentation for _Complex types extension

    While cleaning up the bug database, I noticed there was a request
    to improve the documentation of the _Complex type extensions.
    So I rewrote part of the documentation to make things clearer on
    __real/__imag and even added documentation about casts between
    the scalar and the complex type.
    I moved the documentation of __builtin_complex under this section
    too because it makes more sense than having it in the other
    built-in section and reference it.

    OK? Built make info and make html and checked out the results to
    make sure the tables look decent.

    gcc/ChangeLog:

            PR c/33193
            * doc/extend.texi: Extend the documentation about Complex
            types for casting and also rewrite the __real__/__imag__
            expression portion to use tables.
            Move __builtin_complex to the Complex type section.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/33193] slopiness in __real/__imag
       [not found] <bug-33193-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2022-01-03 17:54 ` cvs-commit at gcc dot gnu.org
@ 2022-01-03 17:55 ` pinskia at gcc dot gnu.org
  2022-02-01 17:23 ` sabre at nondot dot org
  7 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-03 17:55 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/33193] slopiness in __real/__imag
       [not found] <bug-33193-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2022-01-03 17:55 ` pinskia at gcc dot gnu.org
@ 2022-02-01 17:23 ` sabre at nondot dot org
  7 siblings, 0 replies; 11+ messages in thread
From: sabre at nondot dot org @ 2022-02-01 17:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Chris Lattner <sabre at nondot dot org> ---
Cool, thanks for tidying this up Andrew!

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/33193] slopiness in __real/__imag
  2007-08-26  5:26 [Bug c/33193] New: " sabre at nondot dot org
  2007-08-26  5:28 ` [Bug c/33193] " sabre at nondot dot org
  2007-08-26 14:57 ` rguenth at gcc dot gnu dot org
@ 2008-11-14 23:31 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-11-14 23:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2008-11-14 23:29 -------
Here is a small example:
struct a {float x, y; };

struct a f(struct a b)
{
  return __real b;
}
int f1(int *b)
{
  return __imag b -  __real b;
}

(In reply to comment #1)
> Further, http://gcc.gnu.org/onlinedocs/gcc/Complex.html#Complex does not
> document what arguments are accepted to __real and __imag at all.

It should be the same as the functions creal and cimag functions support.

Thanks,
Andrew Pinski


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33193


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/33193] slopiness in __real/__imag
  2007-08-26  5:26 [Bug c/33193] New: " sabre at nondot dot org
  2007-08-26  5:28 ` [Bug c/33193] " sabre at nondot dot org
@ 2007-08-26 14:57 ` rguenth at gcc dot gnu dot org
  2008-11-14 23:31 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-08-26 14:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2007-08-26 14:57 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsm28 at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |accepts-invalid
   Last reconfirmed|0000-00-00 00:00:00         |2007-08-26 14:57:20
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33193


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c/33193] slopiness in __real/__imag
  2007-08-26  5:26 [Bug c/33193] New: " sabre at nondot dot org
@ 2007-08-26  5:28 ` sabre at nondot dot org
  2007-08-26 14:57 ` rguenth at gcc dot gnu dot org
  2008-11-14 23:31 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 11+ messages in thread
From: sabre at nondot dot org @ 2007-08-26  5:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from sabre at nondot dot org  2007-08-26 05:28 -------
Further, http://gcc.gnu.org/onlinedocs/gcc/Complex.html#Complex does not
document what arguments are accepted to __real and __imag at all.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33193


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-02-01 17:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-33193-4@http.gcc.gnu.org/bugzilla/>
2010-11-18 16:26 ` [Bug c/33193] slopiness in __real/__imag froydnj at gcc dot gnu.org
2010-11-18 16:34 ` froydnj at gcc dot gnu.org
2010-11-18 17:22 ` sabre at nondot dot org
2022-01-02  6:04 ` pinskia at gcc dot gnu.org
2022-01-03  1:50 ` pinskia at gcc dot gnu.org
2022-01-03 17:54 ` cvs-commit at gcc dot gnu.org
2022-01-03 17:55 ` pinskia at gcc dot gnu.org
2022-02-01 17:23 ` sabre at nondot dot org
2007-08-26  5:26 [Bug c/33193] New: " sabre at nondot dot org
2007-08-26  5:28 ` [Bug c/33193] " sabre at nondot dot org
2007-08-26 14:57 ` rguenth at gcc dot gnu dot org
2008-11-14 23:31 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).