Bugzilla – Bug 136789
freesci-0.3.4c-5: undefined C code
Last modified: 2005-12-14 18:47:37 UTC
I just tried to compile package freesci-0.3.4c-5 with a prerelease of the GNU C compiler version 4.1. It said said.y:358: warning: operation on `said_tree_pos' may be undefined The source code is retval = said_branch_node(SAID_NEXT_NODE, said_branch_node(SAID_NEXT_NODE, said_leaf_node(SAID_NEXT_NODE, n1), said_branch_node(SAID_NEXT_NODE, said_leaf_node(SAID_NEXT_NODE, n2), t1 ) ), t2 ); but #define SAID_NEXT_NODE ((said_tree_pos == 0) || (said_tree_pos >= VOCAB_TREE_NODES))? said_tree_pos = 0 : said_tree_pos++ I agree with the compiler - this code seems to be undefined. In C, there are no guarantees that side effects are computed left to right in one expression. Suggest code rework. BTW, the email address of the author [ creichen@rbg.informatik.tu-darmstadt.de ] seems to be broken.
How did you compile it?
ah, I see. Well, freesci is a leaf package and this haven't really proven to have any implications at all, so until this happens we'll keep it.
>this haven't really proven to have any implications at all This is the first package, of hundreds in Suse Linux, where I've heard a developer say this. All the other developers are happy to fix undefined code. Entirely your choice.