Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 622 Bytes

warnings.md

File metadata and controls

41 lines (26 loc) · 622 Bytes

Warnings

Warnings can be controlled with "-Wname" and "-Wno-name" and "-Wall". When the same warning exists in gcc cakes uses the same name if possible.

Inside source code you can control warning like this

enum E1 { A };
enum E2 { B };

int main() {

#pragma CAKE diagnostic push
#pragma CAKE diagnostic ignore "-Wenum-compare"
    if (A == B){}
#pragma CAKE diagnostic pop

    if (A == B) {}

}

-Wunused-variable

-Wdeprecated

-Wenum-compare

-Wnonnull

-Waddress

-Wunused-parameter

-Whide-declarator

-Wtypeof-parameter

-Wattributes

-Wunused-value

-Wstyle