Commit 2a86c67b authored by Stefan Behnel's avatar Stefan Behnel

Disable the new compiler warning about ambiguous exception return values when...

Disable the new compiler warning about ambiguous exception return values when the function is external (and therefore possibly not under the control of the user).
parent c97860d3
......@@ -758,7 +758,9 @@ class CFuncDeclaratorNode(CDeclaratorNode):
if not return_type.assignable_from(self.exception_value.type):
error(self.exception_value.pos,
"Exception value incompatible with function return type")
if (return_type.is_int or return_type.is_float) and self.exception_value.has_constant_result():
if (visibility != 'extern'
and (return_type.is_int or return_type.is_float)
and self.exception_value.has_constant_result()):
try:
type_default_value = float(return_type.default_value)
except ValueError:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment