public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/32122] indirect goto to an integer accepted
       [not found] <bug-32122-4@http.gcc.gnu.org/bugzilla/>
@ 2021-09-17  4:37 ` pinskia at gcc dot gnu.org
  2021-09-17  5:19 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-17  4:37 UTC (permalink / raw)
  To: gcc-bugs

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

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|NEW                         |ASSIGNED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine, I have a patch.

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

* [Bug c/32122] indirect goto to an integer accepted
       [not found] <bug-32122-4@http.gcc.gnu.org/bugzilla/>
  2021-09-17  4:37 ` [Bug c/32122] indirect goto to an integer accepted pinskia at gcc dot gnu.org
@ 2021-09-17  5:19 ` pinskia at gcc dot gnu.org
  2021-09-20  4:14 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-17  5:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 51472
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51472&action=edit
Patch which I am testing

It passes all of gcc.dg/dg.exp I am doing a full bootstrap/test right now.

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

* [Bug c/32122] indirect goto to an integer accepted
       [not found] <bug-32122-4@http.gcc.gnu.org/bugzilla/>
  2021-09-17  4:37 ` [Bug c/32122] indirect goto to an integer accepted pinskia at gcc dot gnu.org
  2021-09-17  5:19 ` pinskia at gcc dot gnu.org
@ 2021-09-20  4:14 ` pinskia at gcc dot gnu.org
  2021-09-28 20:02 ` cvs-commit at gcc dot gnu.org
  2021-09-28 20:07 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-20  4:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2021-Septemb
                   |                            |er/579792.html

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Patch finally submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579792.html

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

* [Bug c/32122] indirect goto to an integer accepted
       [not found] <bug-32122-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-09-20  4:14 ` pinskia at gcc dot gnu.org
@ 2021-09-28 20:02 ` cvs-commit at gcc dot gnu.org
  2021-09-28 20:07 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-28 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 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:e12f66d96fe41c8ef8a0d01b6a8394cd6bce3978

commit r12-3947-ge12f66d96fe41c8ef8a0d01b6a8394cd6bce3978
Author: Andrew Pinski <apinski@marvell.com>
Date:   Fri Sep 17 04:59:03 2021 +0000

    c: [PR32122] Require pointer types for computed gotos

    So GCC has always accepted non-pointer types in computed gotos but
    that was wrong based on the documentation:
    Any expression of type void * is allowed.

    So this fixes the problem by requiring the type to
    be a pointer type.

    OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

            PR c/32122

    gcc/c/ChangeLog:

            * c-parser.c (c_parser_statement_after_labels): Pass
            the c_expr instead of the tree to c_finish_goto_ptr.
            * c-typeck.c (c_finish_goto_ptr): Change the second
            argument type to c_expr.
            * c-tree.h (c_finish_goto_ptr): Likewise.
            Error out if the expression was not of a pointer type.

    gcc/testsuite/ChangeLog:

            * gcc.dg/comp-goto-5.c: New test.
            * gcc.dg/comp-goto-6.c: New test.

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

* [Bug c/32122] indirect goto to an integer accepted
       [not found] <bug-32122-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-09-28 20:02 ` cvs-commit at gcc dot gnu.org
@ 2021-09-28 20:07 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-28 20:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

* [Bug c/32122] indirect goto to an integer accepted
  2007-05-28  7:28 [Bug c/32122] New: invalid indirect goto accepted sabre at nondot dot org
  2007-06-10  2:22 ` [Bug c/32122] indirect goto to an integer accepted pinskia at gcc dot gnu dot org
@ 2007-11-23 17:30 ` sjackman at gmail dot com
  1 sibling, 0 replies; 7+ messages in thread
From: sjackman at gmail dot com @ 2007-11-23 17:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from sjackman at gmail dot com  2007-11-23 17:30 -------
I've always used `goto *123;' on embedded targets as a feature to be able to
jump to a constant address. This particularly useful feature should not be
removed. Is a simple change of syntax being suggested, such as `goto *(void
*)123;'? Dereferencing a void pointer looks strange to me, but I guess no
stranger than dereferencing an integer.


-- 

sjackman at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sjackman at gmail dot com


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


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

* [Bug c/32122] indirect goto to an integer accepted
  2007-05-28  7:28 [Bug c/32122] New: invalid indirect goto accepted sabre at nondot dot org
@ 2007-06-10  2:22 ` pinskia at gcc dot gnu dot org
  2007-11-23 17:30 ` sjackman at gmail dot com
  1 sibling, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-10  2:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-06-10 02:21 -------
Confirmed, not a regression as far as the eyes can see.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |accepts-invalid
      Known to fail|                            |2.95.3 3.0.4 3.2.3 3.3.3
                   |                            |3.4.0 4.0.0 4.1.0
   Last reconfirmed|0000-00-00 00:00:00         |2007-06-10 02:21:55
               date|                            |
            Summary|invalid indirect goto       |indirect goto to an integer
                   |accepted                    |accepted


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


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

end of thread, other threads:[~2021-09-28 20:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-32122-4@http.gcc.gnu.org/bugzilla/>
2021-09-17  4:37 ` [Bug c/32122] indirect goto to an integer accepted pinskia at gcc dot gnu.org
2021-09-17  5:19 ` pinskia at gcc dot gnu.org
2021-09-20  4:14 ` pinskia at gcc dot gnu.org
2021-09-28 20:02 ` cvs-commit at gcc dot gnu.org
2021-09-28 20:07 ` pinskia at gcc dot gnu.org
2007-05-28  7:28 [Bug c/32122] New: invalid indirect goto accepted sabre at nondot dot org
2007-06-10  2:22 ` [Bug c/32122] indirect goto to an integer accepted pinskia at gcc dot gnu dot org
2007-11-23 17:30 ` sjackman at gmail dot com

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).