Summary
tests that rely on diff break with clang
Metadata
- Id: 333e1f8290ad0fd952ae760c2bce1900941a667a
- Trac id: 917
- Type: defect
- Reporter: mario
- Owner:
- Cc:
- Status: closed
- Component: unknown
- Estimated difficulty:
- Resolution: fixed
- Priority: minor
- Milestone:
- Version: 4.8.x
- Changetime: 2013-08-24 20:33:01 UTC
- Created: 2012-09-07 02:39:27 UTC
- Keywords: scrutiny tests clang
Attachments
- 333e1f8290ad0fd952ae760c2bce1900941a667a/attachments/0001-Silence-clang-return-type-warnings-by-removing-else-.patch
- 333e1f8290ad0fd952ae760c2bce1900941a667a/attachments/0001-chicken.h-define-C_noret-as-__attribute__-noreturn-f.patch
Description
Not a serious problem. clang generates some warnings that are not in the expected output files.
Warnings like:
../chicken.h:2292:1: warning: control may reach end of non-void function [-Wreturn-type] } ^ ../chicken.h:2299:1: warning: control may reach end of non-void function [-Wreturn-type] } ^ ../chicken.h:2336:1: warning: control may reach end of non-void function [-Wreturn-type] } ^ ../chicken.h:2344:1: warning: control may reach end of non-void function [-Wreturn-type] } ^ 4 warnings generated.
Changes and comments
[2012-09-07 02:51:26 UTC] mario changed description
[2012-09-07 02:51:26 UTC] mario changed summary
[2012-09-07 02:54:36 UTC] zbigniew wrote:
Not positive offhand, but IIRC this is because I had to remove "attribute noreturn" because clang was complaining about it. In terms of functionality it's ok but it is still suboptimal.
[2012-09-09 15:36:35 UTC] mario attached 0001-chicken.h-define-C_noret-as-__attribute__-noreturn-f.patch (description=Patch submitted to chicken-hackers)
[2012-09-14 16:45:50 UTC] zbigniew wrote:
The actual cause of this is the introduction of C_div_by_zero_error followed by an else clause in 4 places. Although legal with the noret attribute, I think it's cleaner (and silences the warnings even without noret) to remove the else. Patch attached.
[2012-09-14 16:46:37 UTC] zbigniew attached 0001-Silence-clang-return-type-warnings-by-removing-else-.patch (description=#f)
[2012-09-14 16:49:25 UTC] zbigniew wrote:
That's not to say the noret patch is not necessary -- it is, and we should leave this ticket open for it -- but in the meantime, my patch is simple and kills a lot of compiler noise, without worrying about clang version.
[2013-08-24 20:33:01 UTC] zbigniew wrote:
Was fixed in f89c875 (C_div_by_zero patch) prior to 4.8.0 release.