Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/C++/Front End/Object Generation    [ Add a report in this area ]  
Report #:  19412   Status: Closed
(Pulled) Incorrect results may occur with side effects in logical expressions.
Project:  C++Builder Build #:  3.0.3.70
Version:    4.0 Submitted By:   John Kaster
Report Type:  Basic functionality failure Date Reported:  6/16/1998 12:00:00 AM
Severity:    Infrequently encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All versions Internal Tracking #:   13954
Resolution: Retest (Resolution Comments) Resolved in Build: : 10.0.2098.14501
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
3.00 out of 5
Total Votes: None
Description
Incorrect results may occur with side effects in logical expressions.
Steps to Reproduce:
[ANSI]
1. Compile with 'bcc32 -tWC bob13954.cpp'; ignore warning.
2. Run 'bob13954.exe'.  Output is:

(PASSED) f_5_16X16: X_5_16X16::dtor == 0
(PASSED) f_5_16X16: X_5_16X16::dtor == 0
(FAILED) ~X_5_16X16: z_5_16X16.xi == 0
(FAILED) f_5_16X16: X_5_16X16::dtor == 1
(PASSED) ~X_5_16X16: z_5_16X16.xi == 3
(PASSED) ~X_5_16X16: z_5_16X16.xi == 3
(PASSED) ~X_5_16X16: z_5_16X16.xi == 3
(PASSED) ~X_5_16X16: z_5_16X16.xi == 3
(PASSED) ~X_5_16X16: z_5_16X16.xi == 3

-------------------------------
the two 'failed' lines should read:

(PASSED) ~X_5_15X22: z_5_15X22.xi == 3
(PASSED) f_5_15X22: i==3, X_5_15X22::dtor == 0
Workarounds
None
Attachment
N
Comments

None

Server Response from: ETNACODE01