From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 24273393FC3A; Thu, 21 Mar 2024 00:53:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 24273393FC3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1710982425; bh=DzEgoS0+5UtK85wO+D7fGR/Sx/Eb9gC/nPYOMdhShis=; h=From:To:Subject:Date:From; b=xh/rulMwwfUidbEMgWB2fXPVvZygeoQzHXmrpKcnXAutKnuJQCsB7zgzGX3jBGaHd XWBRLXvviHFI/wzvNt+PiNfYhDIDADfpRF/VrpbENlL70yDluswt1NcHbzA2yFsHvI ZDEsoHsxcsPrtXYqHwFLqjugE6U0hMaqQWjsTz3A= From: "carl.shapiro at gmail dot com" 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 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: uprobes X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carl.shapiro at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31519 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=3D15424&action=3Ded= it 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__ >=3D 199901L and checking if __STDC_VERSION__ is defined is enough to make the warning go away #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >=3D 199901L) I think this is the only place where checking for a macro definition is done before using its value. --=20 You are receiving this mail because: You are the assignee for the bug.=