Build fix: g++ 4.8 incorrectly disambiguates enum and member
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 26 Apr 2023 22:13:02 +0000 (18:13 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 28 Apr 2023 14:04:58 +0000 (10:04 -0400)
commit42a11b8f4c8d98b33fa1eadcdcda96253e651f0b
tree5d20ec832be8a457bc19dcbff068d7820897afd4
parentb978006283473456b0e545d1c21de60d3e298dc5
Build fix: g++ 4.8 incorrectly disambiguates enum and member

g++ 4.8 fails to build with the following error:

  commands/start.cpp: In function ‘cmd_error_code {anonymous}::start_tracing(const session_spec&)’:
  commands/start.cpp:123:76: error: ‘session_spec::type’ is not a class, namespace, or enumeration
    if (!listing_failed && sessions.size() == 0 && spec.type == session_spec::type::NAME) {
                                                                              ^
  commands/start.cpp:144:36: error: ‘session_spec::type’ is not a class, namespace, or enumeration
       if (spec.type != session_spec::type::NAME) {
                                    ^

The `type` member is renamed to type_ to workaround this compiler bug.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Id46ca4219d4d96db71a9d4523c3571303b2e97a7
src/bin/lttng/commands/destroy.cpp
src/bin/lttng/commands/start.cpp
src/bin/lttng/commands/stop.cpp
src/bin/lttng/utils.cpp
src/bin/lttng/utils.hpp
This page took 0.025765 seconds and 4 git commands to generate.