This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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] | |
Assume rc is non-volatile, and we have
switch(...) { case ...: ...; rc = 1; break; case ...: ...; rc = 1; break; case foo: ...; rc = 2; break; case ...: ...; rc = 1; break; case ...: ...; rc = 1; break; default: ...; rc = 1; break; }
Where the ellipses are known to not include any synchronizatiobn calls,
and do not touch rc.
This can safely (even under the proposed C++ memory model) be transformed to:
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |