* [Bug uprobes/31519] New: sys/sdt.h causes compiler warnings when compiling with C++
@ 2024-03-21 0:53 carl.shapiro at gmail dot com
2024-03-21 1:07 ` [Bug uprobes/31519] " fche at redhat dot com
2024-03-21 1:07 ` fche at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: carl.shapiro at gmail dot com @ 2024-03-21 0:53 UTC (permalink / raw)
To: systemtap
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-21 1:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-21 0:53 [Bug uprobes/31519] New: sys/sdt.h causes compiler warnings when compiling with C++ carl.shapiro at gmail dot com
2024-03-21 1:07 ` [Bug uprobes/31519] " fche at redhat dot com
2024-03-21 1:07 ` fche 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).