Bug 136789 - freesci-0.3.4c-5: undefined C code
Summary: freesci-0.3.4c-5: undefined C code
Status: RESOLVED WONTFIX
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: All SuSE Linux 10.0
: P5 - None : Minor
Target Milestone: ---
Assignee: Mads Martin Joergensen
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-02 22:31 UTC by David Binderman
Modified: 2005-12-14 18:47 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2005-12-02 22:31:48 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.
Comment 1 Mads Martin Joergensen 2005-12-14 12:19:54 UTC
How did you compile it? 
Comment 2 Mads Martin Joergensen 2005-12-14 12:23:44 UTC
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.
Comment 3 David Binderman 2005-12-14 18:47:37 UTC
>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.