Closed
Bug 433084
Opened 16 years ago
Closed 16 years ago
Dehydra/Treehydra/GCC: parameter attributes overridden by function definitions.
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Developer Infrastructure
Source Code Analysis
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dmandelin, Unassigned)
References
Details
Attachments
(1 file)
933 bytes,
patch
|
taras.mozilla
:
review+
|
Details | Diff | Splinter Review |
From bug 420933 comment 3: It appears that parameter annotations in function definitions override those in function declarations. I.e., given: PRBool Get(..., nsIFoo **aFoo NS_OUTPARAM); PRBool Get(..., nsIFoo **aFoo) { // code } At the call site for Get, there will be no attribute. I have confirmed that GCC does this by reading the source. The key line of code is in cp/decl.c near line 2000: DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl) This code is executed when a definition occurs after a declaration, and it overwrites the argument list entirely, thus clobbering all attributes from the declaration.
Reporter | ||
Comment 1•16 years ago
|
||
This does what we need, and allows the analysis to work as needed in bug 431832, and passes all our test cases and builds FF. We will need to check on this for Mac eventually.
Reporter | ||
Updated•16 years ago
|
Attachment #320305 -
Flags: review?(tglek)
Comment 2•16 years ago
|
||
Comment on attachment 320305 [details] [diff] [review] Proposed patch to add to Dehydra GCC patch queue Nice and concise, go ahead and add this to the patch queue, i'd put this patch after plugin.diff
Attachment #320305 -
Flags: review?(tglek) → review+
Reporter | ||
Comment 3•16 years ago
|
||
Pushed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•