Closed
Bug 90366
Opened 24 years ago
Closed 24 years ago
xpidl-generated code produces preprocessor warnings
Categories
(Core :: XPCOM, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9.4
People
(Reporter: ahc4, Assigned: dbradley)
Details
Attachments
(1 file)
|
2.92 KB,
patch
|
Details | Diff | Splinter Review |
When xpidl generates the _FORWARD macros, it uses preprocessor concatenation to
join _to and the actual method call. On newer versions of gcc (at least the
version with Red Hat 7.1), the preprocessor spits out a warning, since joining
the two doesn't produce a valid token. Removing all occurrences of ## in xpidl.c
fixes this, and everything still builds fine, but I don't know what it would do
on other compilers, since it leaves a space between the first part and the
method name. I believe that inserting a space, as in "MyClass:: MyMethod()" or
"myobject-> MyMethod()" is just as valid C++ as without the space, but I'm not
sure. This isn't that big a deal, but warnings are annoying, particularly when
they're in autogenerated code.
Updated•24 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Comment 1•24 years ago
|
||
Honestly I don't know why the ## operator was used here. AFAICT it's not needed.
My fear is that some compiler out there, choked without it. McCabe put it in
back in version 1.61. Unfortunately he only stated he put it in and not why.
I'm adding shaver and jband in case they might recall why it was needed.
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•24 years ago
|
||
Comment 3•24 years ago
|
||
You should say how you've tested this. I assume you've done a full clobber build
on NT and everything was fine. That would indicate that this is more likely than
not to work everywhere. Assuming you tested, then r/sr=jband. It looks right to
me.
| Assignee | ||
Comment 4•24 years ago
|
||
Yes, I did clobber builds on Win2k and Linux and all was fine.
Comment 5•24 years ago
|
||
I'll check this on the Mac build.
| Assignee | ||
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9.3
Comment 7•24 years ago
|
||
The Mac build works fine with this patch in place.
Comment 8•24 years ago
|
||
sr=scc
Comment 9•24 years ago
|
||
r=jst
| Assignee | ||
Comment 10•24 years ago
|
||
patch checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•