Skip to content

miscompilation when using add_main_option_entry #1

@bstarynk

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

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