-
Notifications
You must be signed in to change notification settings - Fork 82
Closed
Description
Issue description:
enum (*= 1)
{
EnumItem1 = 1,
EnumItem2,
EnumItem3,
EnumItem4,
};
main()
{
printf("EnumItem1: %d", EnumItem1);
printf("EnumItem2: %d", EnumItem2);
printf("EnumItem3: %d", EnumItem3);
printf("EnumItem4: %d", EnumItem4);
}
Normally all enumeration elements in this example should be equal to 1
, but when executing this code, it prints the following:
EnumItem1: 1
EnumItem2: 2
EnumItem3: 3
EnumItem4: 4
The same happens if increment *= 1
is replaced with <<= 0
- it's as if no increment was specified at all, so the default increment (+= 1
) takes place.
Minimal complete verifiable example (MCVE):
See above.
Workspace Information:
- Compiler version: 3.10.10, 3.2.3664
- Command line arguments provided (or sampctl version):
- Operating System: