public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/28341] gdb_proc_service.h use of non-standard typeof
[not found] <bug-28341-4717@http.sourceware.org/bugzilla/>
@ 2021-09-15 4:27 ` amodra at gmail dot com
2021-09-19 2:42 ` simark at simark dot ca
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: amodra at gmail dot com @ 2021-09-15 4:27 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28341
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|2.38 (HEAD) |unknown
Component|binutils |gdb
Product|binutils |gdb
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug gdb/28341] gdb_proc_service.h use of non-standard typeof
[not found] <bug-28341-4717@http.sourceware.org/bugzilla/>
2021-09-15 4:27 ` [Bug gdb/28341] gdb_proc_service.h use of non-standard typeof amodra at gmail dot com
@ 2021-09-19 2:42 ` simark at simark dot ca
2021-09-20 12:00 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: simark at simark dot ca @ 2021-09-19 2:42 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28341
Simon Marchi <simark at simark dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simark at simark dot ca
--- Comment #1 from Simon Marchi <simark at simark dot ca> ---
Thanks for the info, someone should write a patch for this. Also, if using no
GNU-ism is important, I think we should be using the "noext" argument to
AX_CXX_COMPILE_STDCXX, so that we always compile with -std=c++11.
And in the mean time, you can always disable building gdb and gdbserver by
configuring with --disable-gdb and --disable-gdbserver, if you don't need them.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug gdb/28341] gdb_proc_service.h use of non-standard typeof
[not found] <bug-28341-4717@http.sourceware.org/bugzilla/>
2021-09-15 4:27 ` [Bug gdb/28341] gdb_proc_service.h use of non-standard typeof amodra at gmail dot com
2021-09-19 2:42 ` simark at simark dot ca
@ 2021-09-20 12:00 ` cvs-commit at gcc dot gnu.org
2021-09-20 12:20 ` simark at simark dot ca
2021-09-20 13:38 ` liulk at likai dot org
4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-20 12:00 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28341
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Simon Marchi <simark@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=56d9e3c5623d9ebaffb4532a503e67203e4d5488
commit 56d9e3c5623d9ebaffb4532a503e67203e4d5488
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Sun Sep 19 21:06:10 2021 -0400
gdbsupport/gdb_proc_service.h: use decltype instead of typeof
Bug 28341 shows that GDB fails to compile when built with -std=c++11.
I don't know much about the use case, but according to the author of the
bug:
I encountered the scenario where CXX is set to "g++ -std=c++11" when
I try to compile binutils under GCC as part of the GCC 3-stage
compilation, which is common for building a cross-compiler.
The author of the bug suggests using __typeof__ instead of typeof. But
since we're using C++, we might as well use decltype, which is standard.
This is what this patch does.
The failure (and fix) can be observed by configuring GDB with CXX="g++
-std=c++11":
CXX linux-low.o
In file included from
/home/simark/src/binutils-gdb/gdbserver/gdb_proc_service.h:22,
from
/home/simark/src/binutils-gdb/gdbserver/linux-low.h:27,
from
/home/simark/src/binutils-gdb/gdbserver/linux-low.cc:20:
/home/simark/src/binutils-gdb/gdbserver/../gdbsupport/gdb_proc_service.h:177:50:
error: expected constructor, destructor, or type conversion before (token
177 | __attribute__((visibility ("default"))) typeof (SYM) SYM
| ^
/home/simark/src/binutils-gdb/gdbserver/../gdbsupport/gdb_proc_service.h:179:1:
note: in expansion of macro PS_EXPORT
179 | PS_EXPORT (ps_get_thread_area);
| ^~~~~~~~~
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28341
Change-Id: I84fbaae938209d8d935ca08dec9b7e6a0dd1bda0
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug gdb/28341] gdb_proc_service.h use of non-standard typeof
[not found] <bug-28341-4717@http.sourceware.org/bugzilla/>
` (2 preceding siblings ...)
2021-09-20 12:00 ` cvs-commit at gcc dot gnu.org
@ 2021-09-20 12:20 ` simark at simark dot ca
2021-09-20 13:38 ` liulk at likai dot org
4 siblings, 0 replies; 5+ messages in thread
From: simark at simark dot ca @ 2021-09-20 12:20 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28341
Simon Marchi <simark at simark dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Simon Marchi <simark at simark dot ca> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug gdb/28341] gdb_proc_service.h use of non-standard typeof
[not found] <bug-28341-4717@http.sourceware.org/bugzilla/>
` (3 preceding siblings ...)
2021-09-20 12:20 ` simark at simark dot ca
@ 2021-09-20 13:38 ` liulk at likai dot org
4 siblings, 0 replies; 5+ messages in thread
From: liulk at likai dot org @ 2021-09-20 13:38 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28341
--- Comment #4 from Likai Liu <liulk at likai dot org> ---
That's brilliant, thanks! I agree that decltype is a better choice than
__typeof__. Somehow that slipped my mind.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-09-20 13:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-28341-4717@http.sourceware.org/bugzilla/>
2021-09-15 4:27 ` [Bug gdb/28341] gdb_proc_service.h use of non-standard typeof amodra at gmail dot com
2021-09-19 2:42 ` simark at simark dot ca
2021-09-20 12:00 ` cvs-commit at gcc dot gnu.org
2021-09-20 12:20 ` simark at simark dot ca
2021-09-20 13:38 ` liulk at likai dot 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).