Functions that return

Is it an error not to return in functions?
Shouldn’t the compile give a warning to help us debug?
(Yes, I had this problem and it took a couple of minutes to notice)

vec3 function(…)
return …;

!!! AH, we reached here

That should give a warning at least, maybe even error (haven’t checked the spec). But I guess not all compilers have implemented checks that all paths return a value yet.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.