public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109142] New: auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token
@ 2023-03-15 10:35 steve_green at qq dot com
2023-03-15 12:07 ` [Bug c++/109142] " redi at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: steve_green at qq dot com @ 2023-03-15 10:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109142
Bug ID: 109142
Summary: auto tmp=*(data_type<T>*)&v: expected
primary-expression before ')' token
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: steve_green at qq dot com
Target Milestone: ---
code that trigger errors:
https://github.com/ELC-lang/ELC/blob/74495c6e72bc61566d29442ea469e02b4fe223f1/parts/header_file/files/elc/random
The specific location where the error was triggered:
https://github.com/ELC-lang/ELC/blob/74495c6e72bc61566d29442ea469e02b4fe223f1/parts/_share/basic_environment/_body.hpp#L427
```text
C:\Users\steve02081504\Documents\workstation\ELC_workdirs\ELC>x86_64-w64-mingw32-g++
-v
Using built-in specs.
COLLECT_GCC=E:\msys\mingw64\bin\x86_64-w64-mingw32-g++.exe
COLLECT_LTO_WRAPPER=E:/msys/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-12.2.0/configure --prefix=/mingw64
--with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32
--host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32
--with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib
--enable-bootstrap --enable-checking=release --with-arch=nocona
--with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit
--enable-shared --enable-static --enable-libatomic --enable-threads=posix
--enable-graphite --enable-fully-dynamic-string
--enable-libstdcxx-filesystem-ts --enable-libstdcxx-time
--disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-multilib
--disable-rpath --disable-win32-registry --disable-nls --disable-werror
--disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64
--with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64
--with-pkgversion='Rev10, Built by MSYS2 project'
--with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as
--with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++
--with-stage1-ldflags=-static-libstdc++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Rev10, Built by MSYS2 project)
C:\Users\steve02081504\Documents\workstation\ELC_workdirs\ELC>x86_64-w64-mingw32-g++
-x c++ -std=c++23 .\parts\header_file\files\elc\random
In file included from
.\parts\header_file\files\elc\_files/base_defs/_body.hpp:33,
from .\parts\header_file\files\elc\base_defs:50,
from .\parts\header_file\files\elc\random:33:
.\parts\header_file\files\elc\_files/base_defs/../../../../../_share/basic_environment/_body.hpp:
In function 'constexpr auto elc::defs::basic_environment::get_precision(T)':
.\parts\header_file\files\elc\_files/base_defs/../../../../../_share/basic_environment/_body.hpp:427:49:
error: expected primary-expression before ')' token
427 | auto tmp=*(data_type<T>*)&v;
| ^
.\parts\header_file\files\elc\_files/base_defs/../../../../../_share/basic_environment/_body.hpp:
In function 'constexpr auto
elc::defs::basic_environment::base_get_exponent(T)':
.\parts\header_file\files\elc\_files/base_defs/../../../../../_share/basic_environment/_body.hpp:442:49:
error: expected primary-expression before ')' token
442 | auto tmp=*(data_type<T>*)&v;
| ^
```
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109142] auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token
2023-03-15 10:35 [Bug c++/109142] New: auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token steve_green at qq dot com
@ 2023-03-15 12:07 ` redi at gcc dot gnu.org
2023-03-15 13:05 ` steve_green at qq dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2023-03-15 12:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109142
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-03-15
Ever confirmed|0 |1
Status|UNCONFIRMED |WAITING
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
As requested when you created the bug, please read https://gcc.gnu.org/bugs/
and provide the preprocessed source, not a URL.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109142] auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token
2023-03-15 10:35 [Bug c++/109142] New: auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token steve_green at qq dot com
2023-03-15 12:07 ` [Bug c++/109142] " redi at gcc dot gnu.org
@ 2023-03-15 13:05 ` steve_green at qq dot com
2023-03-15 15:47 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: steve_green at qq dot com @ 2023-03-15 13:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109142
--- Comment #2 from steve02081504 <steve_green at qq dot com> ---
Created attachment 54672
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54672&action=edit
cpp file
Here's the pre-processed file you want,hope it helps
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109142] auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token
2023-03-15 10:35 [Bug c++/109142] New: auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token steve_green at qq dot com
2023-03-15 12:07 ` [Bug c++/109142] " redi at gcc dot gnu.org
2023-03-15 13:05 ` steve_green at qq dot com
@ 2023-03-15 15:47 ` redi at gcc dot gnu.org
2023-03-15 16:09 ` xry111 at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2023-03-15 15:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109142
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |UNCONFIRMED
Ever confirmed|1 |0
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109142] auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token
2023-03-15 10:35 [Bug c++/109142] New: auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token steve_green at qq dot com
` (2 preceding siblings ...)
2023-03-15 15:47 ` redi at gcc dot gnu.org
@ 2023-03-15 16:09 ` xry111 at gcc dot gnu.org
2023-03-15 16:13 ` pinskia at gcc dot gnu.org
2024-04-13 8:18 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: xry111 at gcc dot gnu.org @ 2023-03-15 16:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109142
--- Comment #4 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
template <class T>
using data_type = decltype([](){return 1;}());
template <class T>
auto get_precision(T v) {
auto tmp = *(data_type<T> *)&v;
return tmp;
}
Clang and MSVC accept this with C++20, though I'm not sure if it's really valid
(I'm not familiar with latest C++ spec development).
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109142] auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token
2023-03-15 10:35 [Bug c++/109142] New: auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token steve_green at qq dot com
` (3 preceding siblings ...)
2023-03-15 16:09 ` xry111 at gcc dot gnu.org
@ 2023-03-15 16:13 ` pinskia at gcc dot gnu.org
2024-04-13 8:18 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-15 16:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109142
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |107430
Keywords| |c++-lambda
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
We have a few bug reports about lambdas inside a decltype part used in a
template alias; I suspect this is a dup of one of those.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107430
[Bug 107430] [meta-bug] lambda in decltype
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109142] auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token
2023-03-15 10:35 [Bug c++/109142] New: auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token steve_green at qq dot com
` (4 preceding siblings ...)
2023-03-15 16:13 ` pinskia at gcc dot gnu.org
@ 2024-04-13 8:18 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-13 8:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109142
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed on the trunk for GCC 14 by the recent lambda template patches.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-04-13 8:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 10:35 [Bug c++/109142] New: auto tmp=*(data_type<T>*)&v: expected primary-expression before ')' token steve_green at qq dot com
2023-03-15 12:07 ` [Bug c++/109142] " redi at gcc dot gnu.org
2023-03-15 13:05 ` steve_green at qq dot com
2023-03-15 15:47 ` redi at gcc dot gnu.org
2023-03-15 16:09 ` xry111 at gcc dot gnu.org
2023-03-15 16:13 ` pinskia at gcc dot gnu.org
2024-04-13 8:18 ` pinskia at gcc dot gnu.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).