[Bug c/65455] typeof _Atomic fails

2021-09-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c/65455] typeof _Atomic fails

2021-08-01 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #24 from Martin Uecker --- This can be closed.

[Bug c/65455] typeof _Atomic fails

2021-01-05 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 Marek Polacek changed: What|Removed |Added Assignee|mpolacek at gcc dot gnu.org|unassigned at gcc dot gnu.org

[Bug c/65455] typeof _Atomic fails

2020-11-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #23 from CVS Commits --- The master branch has been updated by Martin Uecker : https://gcc.gnu.org/g:768ce4f0ceb030e38427e85e483ed44330cd5da7 commit r11-5397-g768ce4f0ceb030e38427e85e483ed44330cd5da7 Author: Martin Uecker Date:

[Bug c/65455] typeof _Atomic fails

2019-03-01 Thread pskocik at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 pskocik at gmail dot com changed: What|Removed |Added CC||pskocik at gmail dot com ---

[Bug c/65455] typeof _Atomic fails

2017-09-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug c/65455] typeof _Atomic fails

2015-08-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #18 from Marek Polacek mpolacek at gcc dot gnu.org --- So this looks like a dup of PR39985. It seems that, if anything, we should modify __typeof to drop all qualifiers. I.e. that all of the following __typeofs yield int: const int

[Bug c/65455] typeof _Atomic fails

2015-08-13 Thread jens.gustedt at inria dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #20 from Jens Gustedt jens.gustedt at inria dot fr --- I would be much happier with a generic operator that makes any object into an rvalue. One way that comes close would be `1 ? (X) : (X)`. This is an expression that transforms any

[Bug c/65455] typeof _Atomic fails

2015-08-13 Thread jens.gustedt at inria dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #21 from Jens Gustedt jens.gustedt at inria dot fr --- I would be much happier with a generic operator that makes any object into an rvalue. One way that comes close would be `1 ? (X) : (X)`. This is an expression that transforms any

[Bug c/65455] typeof _Atomic fails

2015-08-13 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #19 from joseph at codesourcery dot com joseph at codesourcery dot com --- On Thu, 13 Aug 2015, mpolacek at gcc dot gnu.org wrote: So this looks like a dup of PR39985. It seems that, if anything, we should modify __typeof to drop

[Bug c/65455] typeof _Atomic fails

2015-03-19 Thread jens.gustedt at inria dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #11 from Jens Gustedt jens.gustedt at inria dot fr --- (In reply to jos...@codesourcery.com from comment #10) On Wed, 18 Mar 2015, jens.gustedt at inria dot fr wrote: (Perhaps gcc interprets _Generic as you say, but even the

[Bug c/65455] typeof _Atomic fails

2015-03-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 Marek Polacek mpolacek at gcc dot gnu.org changed: What|Removed |Added CC||mpolacek at

[Bug c/65455] typeof _Atomic fails

2015-03-19 Thread jens.gustedt at inria dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #13 from Jens Gustedt jens.gustedt at inria dot fr --- (In reply to Marek Polacek from comment #12) What does clang differently wrt _Generic? Arrays. I don't recall which way around, but one of gcc and clang converts array types to

[Bug c/65455] typeof _Atomic fails

2015-03-19 Thread jens.gustedt at inria dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #14 from Jens Gustedt jens.gustedt at inria dot fr --- Perhaps we should end the discussion here, this goes too far for a bug report, and we should push for a solution of this type of questions by the C committee. Perhaps you could

[Bug c/65455] typeof _Atomic fails

2015-03-19 Thread jens.gustedt at inria dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #16 from Jens Gustedt jens.gustedt at inria dot fr --- (In reply to Jakub Jelinek from comment #15) Usually such bugs are SUSPENDED with reference to the DR and when the DR is resolved, the bug is resolved accordingly. Here the

[Bug c/65455] typeof _Atomic fails

2015-03-19 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added CC||jakub at gcc dot

[Bug c/65455] typeof _Atomic fails

2015-03-19 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #17 from Marek Polacek mpolacek at gcc dot gnu.org --- (In reply to Jens Gustedt from comment #16) Here the situation is a bit more complicated, since __typeof__ is an extension to C, so no DR will directly say something about this.

[Bug c/65455] typeof _Atomic fails

2015-03-18 Thread jens.gustedt at inria dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #4 from Jens Gustedt jens.gustedt at inria dot fr --- This is a surprising policy change that occurs a random point in time, namely where _Atomic is introduced to the C language and in addition does that in a very unituitive way. Why

[Bug c/65455] typeof _Atomic fails

2015-03-18 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #6 from joseph at codesourcery dot com joseph at codesourcery dot com --- (_Generic does make sure to treat its controlling expression as an rvalue, removing qualifiers including _Atomic as well as ensuring GCC's internal

[Bug c/65455] typeof _Atomic fails

2015-03-18 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #9 from joseph at codesourcery dot com joseph at codesourcery dot com --- On Wed, 18 Mar 2015, jens.gustedt at inria dot fr wrote: This bugzilla really sucks. There is my second comment that I place here gone to the void.

[Bug c/65455] typeof _Atomic fails

2015-03-18 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #10 from joseph at codesourcery dot com joseph at codesourcery dot com --- On Wed, 18 Mar 2015, jens.gustedt at inria dot fr wrote: (Perhaps gcc interprets _Generic as you say, but even the standard committee doesn't agree on that

[Bug c/65455] typeof _Atomic fails

2015-03-18 Thread jens.gustedt at inria dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #8 from Jens Gustedt jens.gustedt at inria dot fr --- (Perhaps gcc interprets _Generic as you say, but even the standard committee doesn't agree on that interpretation, and other compiler implementors don't agree either. Nothing in

[Bug c/65455] typeof _Atomic fails

2015-03-18 Thread jens.gustedt at inria dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #7 from Jens Gustedt jens.gustedt at inria dot fr --- This bugzilla really sucks. There is my second comment that I place here gone to the void. Obviously you did see it, since you replied to my mention of _Generic, but now its gone.

[Bug c/65455] typeof _Atomic fails

2015-03-18 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #5 from joseph at codesourcery dot com joseph at codesourcery dot com --- stdatomic.h uses both __auto_type and __typeof__. In the cases where __typeof__ is used, (a) const and _Atomic (and maybe volatile) must be removed and (b)

[Bug c/65455] typeof _Atomic fails

2015-03-17 Thread jens.gustedt at inria dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #2 from Jens Gustedt jens.gustedt at inria dot fr --- Since typeof is a gcc extension, there is not much arguing about it, but this sounds wrong to me. Use cases I have, and that I seen used by others are for example something like

[Bug c/65455] typeof _Atomic fails

2015-03-17 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #1 from joseph at codesourcery dot com joseph at codesourcery dot com --- By design, typeof removes qualifiers in certain cases. Currently it only removes them from atomic types (as needed for use in stdatomic.h), but arguably it

[Bug c/65455] typeof _Atomic fails

2015-03-17 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455 --- Comment #3 from joseph at codesourcery dot com joseph at codesourcery dot com --- On Tue, 17 Mar 2015, jens.gustedt at inria dot fr wrote: Eliminating qualifiers in expressions is easy for arithmetic types at least, something like