Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
Compiler
C++
Back End
Debug Info
Front End
Interaction with the IDE
Modeling
MS Compat.
Delphi
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/Compiler/C++
[ Add a report in this area ]
Report #:
101307
Status:
Closed
Ternary operators may not work with properties
Project:
C++Builder
Build #:
16.0.4316.44803
Version:
16.2
Submitted By:
Luis Branca
Report Type:
Crash / Data loss / Total failure
Date Reported:
11/25/2011 3:11:29 AM
Severity:
Serious / Highly visible problem
Last Updated:
4/25/2012 6:16:33 PM
Platform:
All versions
Internal Tracking #:
288981
Resolution:
Fixed
(Resolution Comments)
Resolved in Build:
:
Update 4
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
None
Description
Accessing properties through a ternary operator may cause an AV.
Steps to Reproduce:
The following code, causes an Access Violation:
struct {
__property int Bar = { read = GetBar };
int GetBar() { return 0; }
void Foo() {
int Foo1 = 0;
const int &Foo2 = (int(Date()) ? Bar : Foo1);
}
} FooBar;
void __fastcall TForm1::Button1Click(TObject *Sender)
{
FooBar.Foo();
}
Workarounds
None
Attachment
Win32.zip
Comments
Luis Branca at 4/24/2012 8:28:19 AM
-
Seems fixed on XE2 UP4 (16.0.4429.46931).
Tomohiro Takahashi at 4/25/2012 3:49:53 AM
-
Thanks for the confirmation. I will check the internal status of this report.
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us