Opened 8 years ago
Closed 8 years ago
#716 closed defect (fixed)
DOWNCAST may cause undefined behavior
Reported by: | westram | Owned by: | westram |
---|---|---|---|
Priority: | blocker | Milestone: | |
Component: | global | Version: | SVN |
Keywords: | Cc: |
Description (last modified by westram)
Example: See [15191] and [15192]
May happen whenever class DERIVED is not completely defined when using DOWNCAST(DERIVED*,pointer). Using static_cast<DERIVED*>(pointer) works and reveals the problem: it reports a compile error in the above situation.
Problems:
- DOWNCAST uses a c-style cast, but it should use a static_cast. Does not compile atm ⇒ fix
- DOWNCAST should use static_cast in DEBUG version as well (to trigger the compile error)
Change History (2)
comment:1 Changed 8 years ago by westram
- Status changed from new to _started
comment:2 Changed 8 years ago by westram
- Description modified (diff)
- Resolution set to fixed
- Status changed from _started to closed
Note: See
TracTickets for help on using
tickets.
by [15195]