Skip to content

miscompilation when using add_main_option_entry #1

Description

@bstarynk

Consider

#if 0 && badcode

If you change the #if 0 && badcode into a #if 1 that does not compile anymore:

mainrps_gtk.cc:85:2: warning: #warning help needed here to parse program arguments [-Wcpp]
   85 | #warning help needed here to parse program arguments
      |  ^~~~~~~
mainrps_gtk.cc: In function ‘int main(int, char**)’:
mainrps_gtk.cc:87:55: error: ‘OPTION_TYPE_BOOL’ is not a member of ‘Gio::Application’
   87 |   gtkrps_app->add_main_option_entry(Gio::Application::OPTION_TYPE_BOOL,   "version",    'V',
      |                                                       ^~~~~~~~~~~~~~~~
mainrps_gtk.cc:89:55: error: ‘OPTION_TYPE_STRING’ is not a member of ‘Gio::Application’
   89 |   gtkrps_app->add_main_option_entry(Gio::Application::OPTION_TYPE_STRING,   "fifo-prefix",    'F',
      |                                                       ^~~~~~~~~~~~~~~~~~
make: *** [<builtin>: mainrps_gtk.o] Error 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions