"throw" causes warning: control reaches end of non-void function

Anthony Foiani tkil@scrye.com
Wed Nov 5 19:32:00 GMT 1997


i've looked over the mailing list archives, and couldn't find anything
on this one (do you plan on putting a text search on those things,
btw?  they are getting quite large...)

anyway, with both the 970924 and 971031 snapshots, i got the following
warning from -Wall:

/opt/local/egcs-971031/include/g++/list.h: In method `struct __list_node<RTF_Node *> * list<RTF_Node *,__default_alloc_template<false,0> >::create_node(class RTF_Node *const &)':
/opt/local/egcs-971031/include/g++/list.h:159: warning: control reaches end of non-void function `list<RTF_Node *,__default_alloc_template<false,0> >::create_node(RTF_Node *const &)'

i tried to grok the source, but it defeated me.  anyway, i believe
that this warning should be removed; an unconditional throw should
probably qualify as a return statement, at least for the purposes of
this warning.

thanks for the great work,
tony

-- 
Tkil * <URL: http://scrye.com/~tkil > * hopelessly hopeless romantic.
  "So amplify this little one 	|   She hears as much as she can see
   She's a volume freak       	|   And what she sees, she can't believe."
        -- Catherine Wheel, _Happy Days_, "Judy Staring At The Sun"



More information about the Gcc mailing list