Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: pgnet.dev@gmail.com, gdb@sourceware.org
Subject: Re: gdb/head build, with GCC10, FAILs @ "error: expected constructor, destructor, or type conversion before ‘(’ token" ?
Date: Thu, 26 Mar 2020 09:08:05 +0100	[thread overview]
Message-ID: <ff343fc5-50ab-768a-1611-007caa2d4a91@suse.de> (raw)
In-Reply-To: <ce4c359b-4b0a-4d94-9842-30e1129b841a@suse.de>

On 26-03-2020 08:17, Tom de Vries wrote:
> On 26-03-2020 00:25, PGNet Dev via Gdb wrote:
>> building
>>
>> 	cd src/binutils-gdb
>> 	git log | head -n 5
>> 		commit 33aa3c10f663b834c9573ede439b2df3c92f0cfe
>> 		Author: Tom Tromey <tom@tromey.com>
>> 		Date:   Wed Mar 25 10:26:38 2020 -0600
>> 		...
>>
>> with
>>
>> 	gcc --version
>> 		gcc (SUSE Linux) 10.0.1 20200324 (experimental) [revision 75c24a08d697d6442fe6c26142f0559f803af977]
>>
>> config's
>>
>> 	export LDFLAGS="-L/usr/local/pyenv/versions/3.8-dev/lib -Wl,-rpath,/usr/local/pyenv/versions/3.8-dev/lib"
>> 	export LIBS="-lpython3.8"
>> 	./configure \
>> 	 --prefix=/usr/local/gdb-test \
>> 	 --with-python=/usr/local/pyenv/versions/3.8-dev
>>
>> no errors.
>>
>> make FAILs @ gdbsupport/gdb_proc_service.h
>>
>> 	make V=1
>> 		...
>> 		/usr/bin/g++-10  -O3 -Wall -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fmessage-length=0 -grecord-gcc-switches -march=native -mtune=native -std=c++17    -I. -I. -I./../gdb/regformats -I./.. -I./../include -I./../gdb -I./../gnulib/import -I../gnulib/import -I./.. -I..  -O3 -Wall -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fmessage-length=0 -grecord-gcc-switches -march=native -mtune=native -D_FORTIFY_SOURCE=2 -pthread -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-variable -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-error=maybe-uninitialized -Wno-mismatched-tags -Wsuggest-override -Wimplicit-fallthrough=3 -Wduplicated-cond -Wshadow=local -Wdeprecated-copy -Wdeprecated-copy-dtor -Wredundant-move -Wmissing-declarations -Wstrict-null-sentinel -Wformat -Wformat-nonliteral -Werror -DGDBSERVER -c -o linux-low.o -MT linux-low.o -MMD -MP -MF ./.deps/linux-low.Tpo linux-low.cc
> 
> I can reproduce this by using CXXFLAGS=-std=c++17 (which for some reason
> I don't see mentioned in the build settings description above).
> 

g++-10 has as default language -std=gnu++14. By compiling with
-std=c++17 you turn off support for GNU extensions, and typeof is the
extension that's used here.

So, if you want to not run into this particular error, you can use
-std=gnu++17.

However, I tried using that setting and ran into another error:
...
/data/gdb_versions/devel/src/gdb/inferior.h:82:12: error: 'bool
std::uncaught_exception()' is deprecated [-Werror=deprecated-declarations]
   82 |  if (!std::uncaught_exception ())
...

So, I'm guessing this is not a common build configuration.

Thanks,
- Tom

  reply	other threads:[~2020-03-26  8:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 23:25 PGNet Dev
2020-03-26  7:17 ` Tom de Vries
2020-03-26  8:08   ` Tom de Vries [this message]
2020-03-26 17:18     ` PGNet Dev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff343fc5-50ab-768a-1611-007caa2d4a91@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb@sourceware.org \
    --cc=pgnet.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox