https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93120
Bug ID: 93120
Summary: gcc-9 complains fails to see that switch handles all
enum values, and still complains ' "control reaches
end of non-void function" when there is no return
after the switch
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: yuri at tsoft dot com
Target Milestone: ---
Example:
https://github.com/yurivict/nn-insight/blob/master/plugins/tf-lite/tf-lite.cpp#L33
gcc-9 complains:
> /usr/ports/misc/nn-insight/work/nn-insight-0.1-3-g78a125f/plugins/tf-lite/tf-lite.cpp:
> In function 'PluginInterface::PaddingType
> Helpers::convertPaddingType(tflite::Padding)':
> /usr/ports/misc/nn-insight/work/nn-insight-0.1-3-g78a125f/plugins/tf-lite/tf-lite.cpp:37:2:
> warning: control reaches end of non-void function [-Wreturn-type]
> 37 | }
> | ^