public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* riscv libsanitizer: error: missing terminating ' character
@ 2020-06-05  5:15 Zdenek Sojka
  2020-06-05 16:11 ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: Zdenek Sojka @ 2020-06-05  5:15 UTC (permalink / raw)
  To: gcc-help

Hello,

I've gcc x86_64-pc-linux-gnu to riscv64-unknown-linux-gnu cross-compiler 
configured as:

/repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-
annotations --disable-nls --enable-checking=yes,rtl,df,extra --with-cloog --
with-ppl --with-isl --with-sysroot=/usr/riscv64-unknown-linux-gnu --build=x
86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=riscv64-unknown-linux
-gnu --with-ld=/usr/bin/riscv64-unknown-linux-gnu-ld --with-as=/usr/bin/
riscv64-unknown-linux-gnu-as --disable-multilib --disable-libstdcxx-pch --
prefix=/repo/gcc-trunk//binary-trunk-r11-767-20200601155732-gff7da2b5d62-
checking-yes-rtl-df-extra-riscv64

Recently, probably since the libsanitizer master merge https://gcc.gnu.org/
pipermail/gcc-patches/2020-June/547010.html , I am failing to build the 
libsanitizer:

libtool: compile:  /repo/build-gcc-trunk-riscv64/./gcc/xgcc -shared-libgcc -
B/repo/build-gcc-trunk-riscv64/./gcc -nostdinc++ -L/repo/build-gcc-trunk-
riscv64/riscv64-unknown-linux-gnu/libstdc++-v3/src -L/repo/build-gcc-trunk-
riscv64/riscv64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/repo/build-gcc-
trunk-riscv64/riscv64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -B/
repo/gcc-trunk//binary-trunk-r11-962-20200605114410-g6c6931a353a-checking-
yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/bin/ -B/repo/gcc-trunk//
binary-trunk-r11-962-20200605114410-g6c6931a353a-checking-yes-rtl-df-extra-
riscv64/riscv64-unknown-linux-gnu/lib/ -isystem /repo/gcc-trunk//binary-
trunk-r11-962-20200605114410-g6c6931a353a-checking-yes-rtl-df-extra-riscv64/
riscv64-unknown-linux-gnu/include -isystem /repo/gcc-trunk//binary-trunk-r11
-962-20200605114410-g6c6931a353a-checking-yes-rtl-df-extra-riscv64/riscv64-
unknown-linux-gnu/sys-include -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_
MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAVE_RPC_XDR_H=0 -
DHAVE_TIRPC_RPC_XDR_H=0 -I. -I/repo/gcc-trunk/libsanitizer/sanitizer_common
-I.. -I /repo/gcc-trunk/libsanitizer/include -I /repo/gcc-trunk/libsanitizer
-isystem /repo/gcc-trunk/libsanitizer/include/system -Wall -W -Wno-unused-
parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-
exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=
hidden -Wno-variadic-macros -I../../libstdc++-v3/include -I../../libstdc++-v
3/include/riscv64-unknown-linux-gnu -I/repo/gcc-trunk/libsanitizer/../
libstdc++-v3/libsupc++ -std=gnu++11 -DSANITIZER_LIBBACKTRACE -DSANITIZER_CP_
DEMANGLE -I /repo/gcc-trunk/libsanitizer/../libbacktrace -I ../libbacktrace
-I /repo/gcc-trunk/libsanitizer/../include -include /repo/gcc-trunk/
libsanitizer/libbacktrace/backtrace-rename.h -g -O2 -D_GNU_SOURCE -MT
sanitizer_linux.lo -MD -MP -MF .deps/sanitizer_linux.Tpo -c /repo/gcc-trunk/
libsanitizer/sanitizer_common/sanitizer_linux.cpp  -fPIC -DPIC -o .libs/
sanitizer_linux.o
/repo/gcc-trunk/libsanitizer/sanitizer_common/sanitizer_linux.cpp:1880:12:
warning: binary constants are a C++14 feature or GCC extension
 1880 |       case 0b10'010:  // c.lwsp (rd != x0)
      |            ^~~~
/repo/gcc-trunk/libsanitizer/sanitizer_common/sanitizer_linux.cpp:1880:16:
warning: missing terminating ' character
 1880 |       case 0b10'010:  // c.lwsp (rd != x0)
      |                ^
/repo/gcc-trunk/libsanitizer/sanitizer_common/sanitizer_linux.cpp:1880:16:
error: missing terminating ' character
 1880 |       case 0b10'010:  // c.lwsp (rd != x0)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~

It seems -std=gnu++11 should be replaced by -std=gnu++14 ; but since I
couldn't find anyone else reporting this issue, maybe the problem is on my
side?

Thanks,
Zdeněk Sojka

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

* Re: riscv libsanitizer: error: missing terminating ' character
  2020-06-05  5:15 riscv libsanitizer: error: missing terminating ' character Zdenek Sojka
@ 2020-06-05 16:11 ` Jonathan Wakely
  2020-06-09  1:32   ` Jim Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2020-06-05 16:11 UTC (permalink / raw)
  To: Zdenek Sojka; +Cc: gcc-help

On Fri, 5 Jun 2020 at 06:17, Zdenek Sojka via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Hello,
>
> I've gcc x86_64-pc-linux-gnu to riscv64-unknown-linux-gnu cross-compiler
> configured as:
>
> /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-
> annotations --disable-nls --enable-checking=yes,rtl,df,extra --with-cloog --
> with-ppl --with-isl --with-sysroot=/usr/riscv64-unknown-linux-gnu --build=x
> 86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=riscv64-unknown-linux
> -gnu --with-ld=/usr/bin/riscv64-unknown-linux-gnu-ld --with-as=/usr/bin/
> riscv64-unknown-linux-gnu-as --disable-multilib --disable-libstdcxx-pch --
> prefix=/repo/gcc-trunk//binary-trunk-r11-767-20200601155732-gff7da2b5d62-
> checking-yes-rtl-df-extra-riscv64
>
> Recently, probably since the libsanitizer master merge https://gcc.gnu.org/
> pipermail/gcc-patches/2020-June/547010.html , I am failing to build the
> libsanitizer:
>
> libtool: compile:  /repo/build-gcc-trunk-riscv64/./gcc/xgcc -shared-libgcc -
> B/repo/build-gcc-trunk-riscv64/./gcc -nostdinc++ -L/repo/build-gcc-trunk-
> riscv64/riscv64-unknown-linux-gnu/libstdc++-v3/src -L/repo/build-gcc-trunk-
> riscv64/riscv64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/repo/build-gcc-
> trunk-riscv64/riscv64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -B/
> repo/gcc-trunk//binary-trunk-r11-962-20200605114410-g6c6931a353a-checking-
> yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/bin/ -B/repo/gcc-trunk//
> binary-trunk-r11-962-20200605114410-g6c6931a353a-checking-yes-rtl-df-extra-
> riscv64/riscv64-unknown-linux-gnu/lib/ -isystem /repo/gcc-trunk//binary-
> trunk-r11-962-20200605114410-g6c6931a353a-checking-yes-rtl-df-extra-riscv64/
> riscv64-unknown-linux-gnu/include -isystem /repo/gcc-trunk//binary-trunk-r11
> -962-20200605114410-g6c6931a353a-checking-yes-rtl-df-extra-riscv64/riscv64-
> unknown-linux-gnu/sys-include -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_
> MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAVE_RPC_XDR_H=0 -
> DHAVE_TIRPC_RPC_XDR_H=0 -I. -I/repo/gcc-trunk/libsanitizer/sanitizer_common
> -I.. -I /repo/gcc-trunk/libsanitizer/include -I /repo/gcc-trunk/libsanitizer
> -isystem /repo/gcc-trunk/libsanitizer/include/system -Wall -W -Wno-unused-
> parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-
> exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=
> hidden -Wno-variadic-macros -I../../libstdc++-v3/include -I../../libstdc++-v
> 3/include/riscv64-unknown-linux-gnu -I/repo/gcc-trunk/libsanitizer/../
> libstdc++-v3/libsupc++ -std=gnu++11 -DSANITIZER_LIBBACKTRACE -DSANITIZER_CP_
> DEMANGLE -I /repo/gcc-trunk/libsanitizer/../libbacktrace -I ../libbacktrace
> -I /repo/gcc-trunk/libsanitizer/../include -include /repo/gcc-trunk/
> libsanitizer/libbacktrace/backtrace-rename.h -g -O2 -D_GNU_SOURCE -MT
> sanitizer_linux.lo -MD -MP -MF .deps/sanitizer_linux.Tpo -c /repo/gcc-trunk/
> libsanitizer/sanitizer_common/sanitizer_linux.cpp  -fPIC -DPIC -o .libs/
> sanitizer_linux.o
> /repo/gcc-trunk/libsanitizer/sanitizer_common/sanitizer_linux.cpp:1880:12:
> warning: binary constants are a C++14 feature or GCC extension
>  1880 |       case 0b10'010:  // c.lwsp (rd != x0)
>       |            ^~~~
> /repo/gcc-trunk/libsanitizer/sanitizer_common/sanitizer_linux.cpp:1880:16:
> warning: missing terminating ' character
>  1880 |       case 0b10'010:  // c.lwsp (rd != x0)
>       |                ^
> /repo/gcc-trunk/libsanitizer/sanitizer_common/sanitizer_linux.cpp:1880:16:
> error: missing terminating ' character
>  1880 |       case 0b10'010:  // c.lwsp (rd != x0)
>       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> It seems -std=gnu++11 should be replaced by -std=gnu++14 ; but since I
> couldn't find anyone else reporting this issue, maybe the problem is on my
> side?

The single quote as a digit separator is a C++14 feature, so the
libsanitizer code should not be using it.

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

* Re: riscv libsanitizer: error: missing terminating ' character
  2020-06-05 16:11 ` Jonathan Wakely
@ 2020-06-09  1:32   ` Jim Wilson
  2020-06-09 11:40     ` Zdenek Sojka
  2020-06-09 13:38     ` Jonathan Wakely
  0 siblings, 2 replies; 5+ messages in thread
From: Jim Wilson @ 2020-06-09  1:32 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Zdenek Sojka, gcc-help

On Fri, Jun 5, 2020 at 9:11 AM Jonathan Wakely via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
> > It seems -std=gnu++11 should be replaced by -std=gnu++14 ; but since I
> > couldn't find anyone else reporting this issue, maybe the problem is on my
> > side?
>
> The single quote as a digit separator is a C++14 feature, so the
> libsanitizer code should not be using it.

The libsanitizer sources are imported from an external tree.  We can't
dictate what language version they are written in.  It looks like we
do have a set of local patches that we apply after a merge.  So
someone could add a local patch for this to remove the single quotes
if necessary.

I can reproduce on an x86_64-linux system, so this isn't a RISC-V
specific problem.  They are just warnings that don't affect the build.
Probably no one noticed because the build didn't break.  I'd suggest
filing a bug report.

Jim

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

* Re: riscv libsanitizer: error: missing terminating ' character
  2020-06-09  1:32   ` Jim Wilson
@ 2020-06-09 11:40     ` Zdenek Sojka
  2020-06-09 13:38     ` Jonathan Wakely
  1 sibling, 0 replies; 5+ messages in thread
From: Zdenek Sojka @ 2020-06-09 11:40 UTC (permalink / raw)
  To: Jim Wilson; +Cc: gcc-help, Jonathan Wakely

Hello,

---------- Původní e-mail ----------

Od: Jim Wilson <jimw@sifive.com>

Komu: Jonathan Wakely <jwakely.gcc@gmail.com>

Datum: 9. 6. 2020 3:33:10

Předmět: Re: riscv libsanitizer: error: missing terminating ' character

On Fri, Jun 5, 2020 at 9:11 AM Jonathan Wakely via Gcc-help

<gcc-help@gcc.gnu.org> wrote:

> > It seems -std=gnu++11 should be replaced by -std=gnu++14 ; but since I

> > couldn't find anyone else reporting this issue, maybe the problem is on my

> > side?

>

> The single quote as a digit separator is a C++14 feature, so the

> libsanitizer code should not be using it.


> The libsanitizer sources are imported from an external tree.  We can't
> dictate what language version they are written in.  It looks like we
> do have a set of local patches that we apply after a merge.  So
> someone could add a local patch for this to remove the single quotes
> if necessary.

> I can reproduce on an x86_64-linux system, so this isn't a RISC-V
> specific problem.  They are just warnings that don't affect the build.
> Probably no one noticed because the build didn't break.  I'd suggest
> filing a bug report.



thank you both, I've opened https://gcc.gnu.org/PR95603 for this.

Best regards,
Zdenek Sojka


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

* Re: riscv libsanitizer: error: missing terminating ' character
  2020-06-09  1:32   ` Jim Wilson
  2020-06-09 11:40     ` Zdenek Sojka
@ 2020-06-09 13:38     ` Jonathan Wakely
  1 sibling, 0 replies; 5+ messages in thread
From: Jonathan Wakely @ 2020-06-09 13:38 UTC (permalink / raw)
  To: Jim Wilson; +Cc: Zdenek Sojka, gcc-help

On Tue, 9 Jun 2020 at 02:33, Jim Wilson wrote:
>
> On Fri, Jun 5, 2020 at 9:11 AM Jonathan Wakely via Gcc-help
> <gcc-help@gcc.gnu.org> wrote:
> > > It seems -std=gnu++11 should be replaced by -std=gnu++14 ; but since I
> > > couldn't find anyone else reporting this issue, maybe the problem is on my
> > > side?
> >
> > The single quote as a digit separator is a C++14 feature, so the
> > libsanitizer code should not be using it.
>
> The libsanitizer sources are imported from an external tree.  We can't
> dictate what language version they are written in.  It looks like we
> do have a set of local patches that we apply after a merge.  So
> someone could add a local patch for this to remove the single quotes
> if necessary.

Right, what I meant is that our copy of the libsanitizer code should
not be using C++14 features, because we build it as C++11.

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

end of thread, other threads:[~2020-06-09 13:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05  5:15 riscv libsanitizer: error: missing terminating ' character Zdenek Sojka
2020-06-05 16:11 ` Jonathan Wakely
2020-06-09  1:32   ` Jim Wilson
2020-06-09 11:40     ` Zdenek Sojka
2020-06-09 13:38     ` 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).