This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
I believe Andrew's right and the strcpy case is valid, but you do have a point. I think this should be rejected:
struct A { int i; }; struct B { A get() { return A(); } };
int main ()
{
B b;
b.get().i = 0;
// int& error = b.get().i;
}
int main ()
{
B b;
b.get() = 0;
}| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |