Opened 12 years ago
Closed 11 years ago
#917 closed defect (fixed)
tests that rely on diff break with clang
Reported by: | Mario Domenech Goulart | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | unknown | Version: | 4.8.x |
Keywords: | scrutiny tests clang | Cc: | |
Estimated difficulty: |
Description (last modified by )
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.
Attachments (2)
Change History (7)
comment:1 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Summary: | scrutiny test breaks with clang → tests that rely on diff break with clang |
comment:2 Changed 12 years ago by
Changed 12 years ago by
Attachment: | 0001-chicken.h-define-C_noret-as-__attribute__-noreturn-f.patch added |
---|
Patch submitted to chicken-hackers
comment:3 Changed 12 years ago by
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.
Changed 12 years ago by
Attachment: | 0001-Silence-clang-return-type-warnings-by-removing-else-.patch added |
---|
comment:4 Changed 12 years ago by
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.
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Was fixed in f89c875 (C_div_by_zero patch) prior to 4.8.0 release.
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.