From: "carl.shapiro at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug uprobes/31519] New: sys/sdt.h causes compiler warnings when compiling with C++
Date: Thu, 21 Mar 2024 00:53:44 +0000 [thread overview]
Message-ID: <bug-31519-6586@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=31519
Bug ID: 31519
Summary: sys/sdt.h causes compiler warnings when compiling with
C++
Product: systemtap
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: uprobes
Assignee: systemtap at sourceware dot org
Reporter: carl.shapiro at gmail dot com
Target Milestone: ---
Created attachment 15424
--> https://sourceware.org/bugzilla/attachment.cgi?id=15424&action=edit
patch for sys/sdt.h
We are seeing the following warning when using sys/sdt.h from C++
sys/sdt.h:471:5: warning: "__STDC_VERSION__" is not defined, evaluates to 0
[-Wundef]
According to the GCC documentation, __STDC_VERSION__ is not defined when
compiling C++
https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
The following is the only use of __STDC_VERSION__ in sys/sdt.h
#if __STDC_VERSION__ >= 199901L
and checking if __STDC_VERSION__ is defined is enough to make the warning go
away
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
I think this is the only place where checking for a macro definition is done
before using its value.
--
You are receiving this mail because:
You are the assignee for the bug.
next reply other threads:[~2024-03-21 0:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 0:53 carl.shapiro at gmail dot com [this message]
2024-03-21 1:07 ` [Bug uprobes/31519] " fche at redhat dot com
2024-03-21 1:07 ` fche at redhat dot com
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=bug-31519-6586@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).