[Bug 48824] build error - xaudio2_7/xact_dll.c:1192:9: error: case label does not reduce to an integer constant

WineHQ Bugzilla wine-bugs at winehq.org
Sun Mar 29 23:32:03 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=48824

Alistair Leslie-Hughes <leslie_alistair at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #8 from Alistair Leslie-Hughes <leslie_alistair at hotmail.com> ---
Using the code below.

gcc -O2 -o runme main.c      < OK
gcc -O0 -o runme main.c      < Error

So, the level of optimization determines if this code actually compiles.

#include <stdio.h>

static const int two = 2;

int main()
{
    int a,b;

    a=2;
    b=2;

    switch(a){
        case 1:
            printf("Case 1\n");
            break;

        case two:
            printf("Case 2\n");
            break;
    }

    return 0;
}

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list