[Bug c++/69302] parentheses cause address of register variable to be requested (c++1y)

2021-08-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69302

--- Comment #8 from Jonathan Wakely  ---
Fixed by r253266

PR c++/56973, DR 696 - capture constant variables only as needed.

* expr.c (mark_use): Split out from mark_rvalue_use and
mark_lvalue_use.  Handle lambda capture of constant variables.
(mark_lvalue_use_nonread): New.
* semantics.c (process_outer_var_ref): Don't capture a constant
variable until forced.
* pt.c (processing_nonlambda_template): New.
* call.c (build_this): Check it.
* decl2.c (grok_array_decl): Call mark_rvalue_use and
mark_lvalue_use_nonread.
* init.c (constant_value_1): Don't call mark_rvalue_use.
* typeck.c (build_static_cast): Handle lambda capture.

[Bug c++/69302] parentheses cause address of register variable to be requested (c++1y)

2021-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69302

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
   Target Milestone|--- |8.0
 Resolution|--- |FIXED

--- Comment #7 from Andrew Pinski  ---
Fixed in GCC 8+.

Note GCC11+ default to C++17 and register storage class is rejected.

[Bug c++/69302] parentheses cause address of register variable to be requested (c++1y)

2016-01-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69302

Manuel López-Ibáñez  changed:

   What|Removed |Added

Summary|parentheses cause address   |parentheses cause address
   |of register variable to be  |of register variable to be
   |requested   |requested (c++1y)

--- Comment #6 from Manuel López-Ibáñez  ---
Related: Bug 59681