* [Bug runtime/13626] New: gcc 4.7 doesn't compile sdt.h with -std=c++0x
@ 2012-01-26 22:27 mjw at redhat dot com
2012-01-26 22:42 ` [Bug runtime/13626] " mjw at redhat dot com
2012-01-26 23:11 ` mjw at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: mjw at redhat dot com @ 2012-01-26 22:27 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=13626
Bug #: 13626
Summary: gcc 4.7 doesn't compile sdt.h with -std=c++0x
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: runtime
AssignedTo: systemtap@sourceware.org
ReportedBy: mjw@redhat.com
Classification: Unclassified
With gcc 4.7 prerelease, gcc (GCC) 4.7.0 20120123 (Red Hat 4.7.0-0.9) as found
in Fedora Rawhide, sdt.h doesn't compile with g++ -std=c++0x
FAIL: compiling sdt.c c++0x uprobe
FAIL: compiling sdt.c c++0x -pedantic uprobe
FAIL: compiling sdt.c gnu++0x uprobe
FAIL: compiling sdt.c gnu++0x -pedantic uprobe
FAIL: sdt_misc compiling types V3_uprobe c++0x
FAIL: sdt_misc compiling types V3_uprobe c++0x -pedantic
FAIL: sdt_misc compiling types V3_uprobe gnu++0x
FAIL: sdt_misc compiling types V3_uprobe gnu++0x -pedantic
FAIL: compiling sdt_va_args.c c++0x
Other -std settings work fine.
Error look like:
Executing on host: g++ /home/mark/src/systemtap/testsuite/systemtap.base/sdt.c
-g -isystem/home/mark/src/systemtap/testsuite
-isystem/usr/local/install/systemtap/include -Wall -Wextra -Werror -std=c++0x
-x c++ -lm -o sdt.c.exe.7 (timeout = 300)
spawn -ignore SIGHUP g++
/home/mark/src/systemtap/testsuite/systemtap.base/sdt.c -g
-isystem/home/mark/src/systemtap/testsuite
-isystem/usr/local/install/systemtap/include -Wall -Wextra -Werror -std=c++0x
-x c++ -lm -o sdt.c.exe.7
/home/mark/src/systemtap/testsuite/systemtap.base/sdt.c: In function 'void
call0()':
/home/mark/src/systemtap/testsuite/systemtap.base/sdt.c:5:3: error: unable to
find string literal operator 'operator"" _SDT_S'
/home/mark/src/systemtap/testsuite/systemtap.base/sdt.c:5:1: error: unable to
find string literal operator 'operator"" _SDT_S'
/home/mark/src/systemtap/testsuite/systemtap.base/sdt.c: In function 'void
call1(int)':
/home/mark/src/systemtap/testsuite/systemtap.base/sdt.c:10:3: error: unable to
find string literal operator 'operator"" _SDT_S'
/home/mark/src/systemtap/testsuite/systemtap.base/sdt.c:10:1: error: unable to
find string literal operator 'operator"" _SDT_S'
/home/mark/src/systemtap/testsuite/systemtap.base/sdt.c: At global scope:
/home/mark/src/systemtap/testsuite/systemtap.base/sdt.c:8:13: error: unused
parameter 'a' [-Werror=unused-parameter]
[...]
I think this is a g++ bug since sdt.h contains:
# define _SDT_S(x) #x
Or is there a reason that doesn't work with c++0x?
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug runtime/13626] gcc 4.7 doesn't compile sdt.h with -std=c++0x
2012-01-26 22:27 [Bug runtime/13626] New: gcc 4.7 doesn't compile sdt.h with -std=c++0x mjw at redhat dot com
@ 2012-01-26 22:42 ` mjw at redhat dot com
2012-01-26 23:11 ` mjw at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: mjw at redhat dot com @ 2012-01-26 22:42 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=13626
--- Comment #1 from Mark Wielaard <mjw at redhat dot com> 2012-01-26 22:41:21 UTC ---
This is a bug in sdt.h. gcc 4.7 supports user defined literals (UDF):
https://en.wikipedia.org/wiki/C%2B%2B11#User-defined_literals
In std=c++0x mode one now needs to add whitespace.
See http://gcc.gnu.org/gcc-4.7/porting_to.html
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug runtime/13626] gcc 4.7 doesn't compile sdt.h with -std=c++0x
2012-01-26 22:27 [Bug runtime/13626] New: gcc 4.7 doesn't compile sdt.h with -std=c++0x mjw at redhat dot com
2012-01-26 22:42 ` [Bug runtime/13626] " mjw at redhat dot com
@ 2012-01-26 23:11 ` mjw at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: mjw at redhat dot com @ 2012-01-26 23:11 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=13626
Mark Wielaard <mjw at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Mark Wielaard <mjw at redhat dot com> 2012-01-26 23:11:22 UTC ---
commit 99712e8716e19293fe1f6dd84854d350e57945e0
Author: Mark Wielaard <mjw@redhat.com>
Date: Thu Jan 26 23:58:38 2012 +0100
PR13626 Add extra whitespace in sdt.h to deal with C11/C++11 UDF.
gcc 4.7 supports C11/C++11 user defined literals (UDF):
https://en.wikipedia.org/wiki/C%2B%2B11#User-defined_literals
In std=c++0x mode one now needs to add whitespace between string literals.
See http://gcc.gnu.org/gcc-4.7/porting_to.html
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-26 23:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-26 22:27 [Bug runtime/13626] New: gcc 4.7 doesn't compile sdt.h with -std=c++0x mjw at redhat dot com
2012-01-26 22:42 ` [Bug runtime/13626] " mjw at redhat dot com
2012-01-26 23:11 ` mjw at redhat dot com
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).