Generate warnings for out-of-order initialization where possible

VERIFIED FIXED

Status

VERIFIED FIXED
10 years ago
9 years ago

People

(Reporter: lhansen, Assigned: lhansen)

Tracking

Details

Attachments

(2 obsolete attachments)

(Assignee)

Description

10 years ago
The order of member variables in the intialization list for few classes is
different than the order of their declaration.  Some compilers give warnings
for such code (which is buggy in sinister way), but some don't, by default.  We need to change our settings for the reference versions of gcc and msvc so that warnings are generated for this problem.
(Assignee)

Updated

10 years ago
Blocks: 478870

Updated

10 years ago
Blocks: 481413

Updated

10 years ago
No longer blocks: 478870
(Assignee)

Comment 1

10 years ago
-Wreorder in gcc
(Assignee)

Comment 2

10 years ago
Bizarrely this is turned off in configure.py: -Wno-reorder.  That's just wrong, these are real bugs waiting to happen.  Turning it on in Xcode results in warnings in about 10 files, it's not unreasonable to fix this.
(Assignee)

Updated

10 years ago
Assignee: nobody → lhansen
OS: Mac OS X → All
(Assignee)

Comment 3

10 years ago
Created attachment 371210 [details] [diff] [review]
Fix for Xcode and cross-platform build
Attachment #371210 - Flags: review?(edwsmith)
(Assignee)

Comment 4

10 years ago
Created attachment 371229 [details] [diff] [review]
Fix warnings introduced by turning on -Wreorder (Xcode)
Attachment #371229 - Flags: review?(edwsmith)

Updated

10 years ago
Attachment #371210 - Flags: review?(edwsmith) → review+

Updated

10 years ago
Attachment #371229 - Flags: review?(edwsmith) → review+
(Assignee)

Comment 5

10 years ago
Comment on attachment 371210 [details] [diff] [review]
Fix for Xcode and cross-platform build

redux changeset:   1675:88d0e0730e41
Attachment #371210 - Attachment is obsolete: true
(Assignee)

Comment 6

10 years ago
Comment on attachment 371229 [details] [diff] [review]
Fix warnings introduced by turning on -Wreorder (Xcode)

redux changeset:   1676:0bb02b1f0c8c
Attachment #371229 - Attachment is obsolete: true
(Assignee)

Comment 7

10 years ago
Approx 10 minutes of searching leads to the conclusion that Visual Studio does not have a warning switch like -Wreorder.  I could have sworn that Visual C++ version 6 did, but that's a long time ago and my memory may be faulty.
No longer blocks: 481413
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Updated

9 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.