public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: Fixing Error: invalid type argument of unary '*' (have 'int')
@ 2022-08-04 16:54 Seija Kijin
  2022-10-12 11:25 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Seija Kijin @ 2022-08-04 16:54 UTC (permalink / raw)
  To: gcc-patches

Had an error compiling tiny-cuda-nn using gcc 12.1. With this minor
patch, I recompiled and the build succeeded.

No behavioral change.

---
 libstdc++-v3/include/bits/locale_facets_nonio.tcc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
index 17a2c8d4486e..fc35a9e693e7 100644
--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
@@ -1474,8 +1474,8 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
       // calls.  So e.g. if __fmt is "%p %I:%M:%S", we can't handle it
       // properly, because we first handle the %p am/pm specifier and only
       // later the 12-hour format specifier.
-      if ((void*)(this->*(&time_get::do_get)) == (void*)(&time_get::do_get))
- __use_state = true;
+      if ((void*)(this->*(&time_get::do_get)) == (&time_get::do_get))
+        __use_state = true;
 #pragma GCC diagnostic pop
 #endif
       __time_get_state __state = __time_get_state();

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

* Re: [PATCH] libstdc++: Fixing Error: invalid type argument of unary '*' (have 'int')
  2022-08-04 16:54 [PATCH] libstdc++: Fixing Error: invalid type argument of unary '*' (have 'int') Seija Kijin
@ 2022-10-12 11:25 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2022-10-12 11:25 UTC (permalink / raw)
  To: Seija Kijin; +Cc: gcc-patches, libstdc++

On 04/08/22 12:54 -0400, Seija Kijin wrote:
>Had an error compiling tiny-cuda-nn using gcc 12.1. With this minor
>patch, I recompiled and the build succeeded.

This looks like a bug in the cuda compiler then. The libstdc++ code is
correct.

N.B. libstdc++ patches need to be CC'd to the libstdc++ list, or they
won't get reviewed.


>No behavioral change.
>---
> libstdc++-v3/include/bits/locale_facets_nonio.tcc | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
>b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
>index 17a2c8d4486e..fc35a9e693e7 100644
>--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
>+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
>@@ -1474,8 +1474,8 @@ _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
>       // calls.  So e.g. if __fmt is "%p %I:%M:%S", we can't handle it
>       // properly, because we first handle the %p am/pm specifier and only
>       // later the 12-hour format specifier.
>-      if ((void*)(this->*(&time_get::do_get)) == (void*)(&time_get::do_get))
>- __use_state = true;
>+      if ((void*)(this->*(&time_get::do_get)) == (&time_get::do_get))
>+        __use_state = true;
> #pragma GCC diagnostic pop
> #endif
>       __time_get_state __state = __time_get_state();


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

end of thread, other threads:[~2022-10-12 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-04 16:54 [PATCH] libstdc++: Fixing Error: invalid type argument of unary '*' (have 'int') Seija Kijin
2022-10-12 11:25 ` Jonathan Wakely

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