Closed Bug 586130 Opened 14 years ago Closed 13 years ago

warning C4099: '$TYPE' : type name first seen using 'struct' now seen using 'class'

Categories

(Core :: General, defect)

All
Windows Server 2003
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b10

People

(Reporter: dholbert, Assigned: RyanVM)

References

()

Details

(Whiteboard: [build_warning])

Attachments

(6 files, 2 obsolete files)

mozilla-central currently has 248 instances of this sort of warning, on windows builds:
e:\builds\moz2_slave\mozilla-central-win32-debug\build\modules\libpr0n\src\imgStatusTracker.h(43) : warning C4099: 'nsIntRect' : type name first seen using 'struct' now seen using 'class'
(based on clobber build linked in URL field)

Trivial fix -- just need to make sure that forward declarations match the actual definition, on "class" vs. "struct" terminology.

Filing this bug on fixing these.
Attached file list of build warnings (obsolete) —
here's a list of all these build warnings. (grepped from the log linked in URL field)
OS: Linux → Windows Server 2003
Hardware: x86 → All
It looks like the vast majority of these are in auto-generated .h files inside of _ipdlheaders, e.g.:
> obj-firefox\ipc\ipdl\_ipdlheaders\mozilla/layers/PLayers.h(1190) : warning C4099: 'mozilla::layers::ThebesLayerAttributes' : type name first seen using 'struct' now seen using 'class'

In this case, I don't see where the 'class' declaration is coming from -- ThebesLayerAttributes is only ever declared as a struct (in PLayers.ipdl), as shown here:
http://mxr.mozilla.org/mozilla-central/search?string=ThebesLayerAttributes

Perhaps this is a bug in ipdl?
FTR, I think this is pretty 'tarded build warning.  Anyone object to disabling it?

If so, yeah, it looks like IPDL is forward-declaring IPDL structs as |class|, but generating implementations as |struct|.  That's easy to fix.  (Bonus points for building --enable-ipdl-tests!)
The IPDL warnings are taken care of in bug 607002. dholbert, feel free to do what you want with this bug.
Depends on: 607002
Attachment #464645 - Attachment is obsolete: true
Attached patch gfx fixes (obsolete) — Splinter Review
Assignee: nobody → ryanvm
Status: NEW → ASSIGNED
Attachment #504503 - Flags: review?(romaxa)
Attached patch ipc fixesSplinter Review
Attachment #504504 - Flags: review?(jones.chris.g)
Attached patch layout fixesSplinter Review
Attachment #504505 - Flags: review?(dholbert)
Attached patch libpr0n fixesSplinter Review
Attachment #504506 - Flags: review?(joe)
Attached patch storage fixesSplinter Review
Attachment #504507 - Flags: review?(sdwilsh)
Attached patch svg fixesSplinter Review
Attachment #504508 - Flags: review?(dholbert)
The above patches fix all instances of this warning
Comment on attachment 504503 [details] [diff] [review]
gfx fixes

Correct according to original definition
http://hg.mozilla.org/mozilla-central/annotate/a66254dfa588/gfx/src/nsRect.h#l210
Attachment #504503 - Flags: review?(romaxa) → review+
Attachment #504505 - Flags: review?(dholbert) → review+
Attachment #504508 - Flags: review?(dholbert) → review+
Attachment #504504 - Flags: review?(jones.chris.g) → review+
Comment on attachment 504503 [details] [diff] [review]
gfx fixes

This was obsoleted by bug 627178
Attachment #504503 - Attachment is obsolete: true
Attachment #504506 - Flags: review?(joe) → review+
Whiteboard: [build_warning]
Comment on attachment 504507 [details] [diff] [review]
storage fixes

This has been bothering me, but I've been too lazy to file a bug on it.  r=sdwilsh!
Attachment #504507 - Flags: review?(sdwilsh) → review+
Comment on attachment 504504 [details] [diff] [review]
ipc fixes

Extremely low-risk trivial warning fixes. Requesting approval2.0 on the lot.
Attachment #504504 - Flags: approval2.0?
Attachment #504505 - Flags: approval2.0?
Attachment #504506 - Flags: approval2.0?
Attachment #504507 - Flags: approval2.0?
Attachment #504508 - Flags: approval2.0?
Comment on attachment 504504 [details] [diff] [review]
ipc fixes

a=me for the patches altogether
Attachment #504504 - Flags: approval2.0? → approval2.0+
Keywords: checkin-needed
Attachment #504505 - Flags: approval2.0?
Attachment #504508 - Flags: approval2.0?
Attachment #504507 - Flags: approval2.0?
Attachment #504506 - Flags: approval2.0?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: