From: <no...@so...> - 2002-02-19 12:59:40
|
Bugs item #519945, was opened at 2002-02-19 04:56 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=390117&aid=519945&group_id=27350 Category: None Group: v0.9 Status: Open Resolution: None Priority: 5 Submitted By: Shree Kumar (shreekumar) Assigned to: Nobody/Anonymous (nobody) Summary: definitions are also references Initial Comment: LXR 0.9.1 [as well as older versions] shows definition also in the list of references. eg consider a file test.c --- #define TEST 1 -- Searching for "TEST" will show that it is 1. a macro defined at line 1, file test.c and 2. referenced in test.c at line 1 If the number of definitions is small, this is OK. But when the number of definitions is large, finding which of the references are actually references becomes a pain. The easiest solution for this would be to remove all definitions from the references list. If this is acceptable, I have a patch ready [the backend is MySQL] ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=390117&aid=519945&group_id=27350 |
From: <no...@so...> - 2002-05-09 11:04:54
|
Bugs item #519945, was opened at 2002-02-19 21:56 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=390117&aid=519945&group_id=27350 Category: None Group: v0.9 Status: Open Resolution: None Priority: 5 Submitted By: Shree Kumar (shreekumar) >Assigned to: Malcolm Box (mbox) Summary: definitions are also references Initial Comment: LXR 0.9.1 [as well as older versions] shows definition also in the list of references. eg consider a file test.c --- #define TEST 1 -- Searching for "TEST" will show that it is 1. a macro defined at line 1, file test.c and 2. referenced in test.c at line 1 If the number of definitions is small, this is OK. But when the number of definitions is large, finding which of the references are actually references becomes a pain. The easiest solution for this would be to remove all definitions from the references list. If this is acceptable, I have a patch ready [the backend is MySQL] ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=390117&aid=519945&group_id=27350 |
From: SourceForge.net <no...@so...> - 2004-03-12 16:36:41
|
Bugs item #519945, was opened at 2002-02-19 04:56 Message generated for change (Comment added) made by hjtoi You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=519945&group_id=27350 Category: None Group: v0.9 Status: Open Resolution: None Priority: 5 Submitted By: Shree Kumar (shreekumar) Assigned to: Malcolm Box (mbox) Summary: definitions are also references Initial Comment: LXR 0.9.1 [as well as older versions] shows definition also in the list of references. eg consider a file test.c --- #define TEST 1 -- Searching for "TEST" will show that it is 1. a macro defined at line 1, file test.c and 2. referenced in test.c at line 1 If the number of definitions is small, this is OK. But when the number of definitions is large, finding which of the references are actually references becomes a pain. The easiest solution for this would be to remove all definitions from the references list. If this is acceptable, I have a patch ready [the backend is MySQL] ---------------------------------------------------------------------- Comment By: Heikki Toivonen (hjtoi) Date: 2004-03-12 08:17 Message: Logged In: YES user_id=972898 Can you attach a patch, please? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=519945&group_id=27350 |
From: SourceForge.net <no...@so...> - 2009-03-26 17:36:32
|
Bugs item #519945, was opened at 2002-02-19 12:56 Message generated for change (Comment added) made by mbox You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=519945&group_id=27350 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: v0.9 >Status: Closed >Resolution: Rejected Priority: 5 Private: No Submitted By: Shree (shreekumar) Assigned to: Malcolm Box (mbox) Summary: definitions are also references Initial Comment: LXR 0.9.1 [as well as older versions] shows definition also in the list of references. eg consider a file test.c --- #define TEST 1 -- Searching for "TEST" will show that it is 1. a macro defined at line 1, file test.c and 2. referenced in test.c at line 1 If the number of definitions is small, this is OK. But when the number of definitions is large, finding which of the references are actually references becomes a pain. The easiest solution for this would be to remove all definitions from the references list. If this is acceptable, I have a patch ready [the backend is MySQL] ---------------------------------------------------------------------- >Comment By: Malcolm Box (mbox) Date: 2009-03-26 17:36 Message: This is by design - the definition is a reference to the file. Having multiple definitions should be rare, since most languages require a single definition... ---------------------------------------------------------------------- Comment By: Heikki Toivonen (hjtoi) Date: 2004-03-12 16:17 Message: Logged In: YES user_id=972898 Can you attach a patch, please? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=519945&group_id=27350 |
From: Malcolm B. <ma...@br...> - 2002-02-20 03:22:15
|
Hi, I'd like to move the discussion on this to the developer list rather than the horrible SF interface. In fact I'd rather most bug discussion etc was done here if that's OK with people. no...@so... wrote: >Initial Comment: >LXR 0.9.1 [as well as older versions] shows definition >also in the list of references. > >eg consider a file test.c >--- >#define TEST 1 >-- > >Searching for "TEST" will show that it is >1. a macro defined at line 1, file test.c and >2. referenced in test.c at line 1 > I think this is correct - the symbol is referenced at line 1, it just happens that this reference is a definition. Remember, the lxr doesn't attempt to do full parsing of the source (deliberately at the moment), so references simply means that the string "TEST" occurs here and looks like it might be a symbol. >If the number of definitions is small, this is OK. But >when the number of definitions is large, finding which >of the references are actually references becomes a >pain. > Umm, why would a symbol be being defined many times? Most programming languages don't allow you to define a symbol multiple times. >The easiest solution for this would be to remove all >definitions from the references list. > >If this is acceptable, I have a patch ready [the >backend is MySQL] > Personally I'm against this change, but what do others think? Malcolm |
From: Shree K. <sh...@pr...> - 2002-02-20 05:52:21
|
Hi Malcolm, > I think this is correct - the symbol is referenced at line 1, it just > happens that this reference is a definition. Remember, the lxr doesn't > attempt to do full parsing of the source (deliberately at the moment), > so references simply means that the string "TEST" occurs here and looks > like it might be a symbol. > Right, but when you say "reference", most people tend to think that the symbol is being "used" in some way at that line [maybe as an assignment]. It's highly unlikely that anyone would write code like void func() { } void test { func() } > Umm, why would a symbol be being defined many times? Most programming > languages don't allow you to define a symbol multiple times. > One for the fn prototype, one for the fn declaration [think of this over 2 or 3 different platforms]. I've seen the problem becoming acute, particularly with #defines. And it is difficult to filter out the definitions from the references list, when there are too many "definition"s. In a source tree, a symbol being defined many times is a distinct possiblility [I have struggled with this problem before]. Not everything in a source tree might be linked into one. > Personally I'm against this change, but what do others think? Here's one reason that I wanted this change: I've run into situations where we'd like to know where the variable is being initialized, changed, etc. and it is so frustrating to jump to a reference and find out that it is not really a "reference". - Shree Kumar |