Skip to content

Broken debug build #263

@simogasp

Description

@simogasp

Hi,

the debug build is broken because of the -Werror flag.
In particular there are two warnings that are generating the errors:

switch (remainder)
    {
    case 15:
    d += ((uint64_t)u.p8[14]) << 48;
    case 14:
        d += ((uint64_t)u.p8[13]) << 40;
    case 13:
        d += ((uint64_t)u.p8[12]) << 32;
    case 12:
        d += u.p32[2];
        c += u.p64[0];
        break;
    case 11:
        d += ...

A series of switch-case that (I guess/hope :-) ) intentionally fallthrough (ie no break). There is no easy way to fix this, there are ways to fix it for gcc by annotating the code but it is not compatible with clang. There is a [[fallthrought]] annotation in c++17 for this purpose but obviously it requires to upgrade the minimum version of the standard.
Maybe there is another way more complaint with all compilers that I don't know of.
Again the easy way to fix this is to add a -Wno-error=implicit-fallthrough flag (or fixing the switch if it is a bug! :-) )

In case I'd be happy to make the PR for this.

Thanks!

PS
This only affects non-windows builds as no flags are added for windows debug build

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions