Re: [patch] Fix `return' of long/long-long results with no debuginfo

Tom Tromey
2009-03-03T18:10:42Z

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Weighing in on an old-ish thread. AFAIK this has never reached any
sort of resolution.

Jan> Your suggestion ("type of the return value expression given by the user"):
Jan> + improvement over the current state (one _can_ return long or long long)
Jan> - may be more tricky to the user (requirement to cast to long or long long if
Jan> the inferior function returns such type)

How about, in the specific case of "return" from a function without
debug info, we simply require the user to supply a cast to the desired
type. This avoids any problems in choosing a default and it helps
avoid errors introduced by using the type implicit in the expression.

Tom