Bug 110826
Summary: | bad source code | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | d.binderman | ||||
Component: | grub | Assignee: | Peter Jones <pjones> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Mike McLean <mikem> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 1 | CC: | d.binderman, mitr | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2005-01-11 16:35:22 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
d.binderman
2003-11-24 17:12:51 UTC
This is completely legal. Nested functions are perfectly valid C99 and --depth is also completely fine in this context -- using (depth - 1) instead provides different semantics. >This is completely legal. Use of nested functions is a GNU C only extension. See http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html#C%20Extensions for details. I had hoped you would be interested in making the code work on a larger range of compilers than just GNU C. >Nested functions are perfectly valid C99 Not on any C99 compiler I tried. >--depth is also completely fine in this context Again not true. Try reading K&R 2, section 2.12, page 53. read_tree_node (E(depth), --depth) is not legal because there is no sequence point between use of depth in E and its modification. And no, nested functions are not in ISO/IEC 9989-1999. Created attachment 98231 [details]
Output of rpm --rebuild of grub-0.93-7.src.rpm
Adding insult to injury, grub won't even rebuild on a Fedora Core 1 system
using rpmbuild --rebuild. Output from that failed build is attached.
Eli: That is completely unrelated. You need ncurses-devel. Right now, both of these issues compile cleanly and apparently work as expected with gcc. While in principle it's true that grub should be as portable as possible, GCC on Linux is the supported compiler for Fedora and RHEL. This issue needs to be addressed upstream. |