📄 werror-1.c
字号:
/* { dg-do compile } *//* { dg-options "-Waddress -Wattributes -Werror" } *//* { dg-message "warnings being treated as errors" "" {target "*-*-*"} 0 } *//* This is the first in a series of test cases that test the interaction between -Wfoo, -Werror, -Werror=foo, and #pragma GCC diagnostic error foo. This one has all the bits we're testing, the others are subsets of this one. */#pragma GCC diagnostic error "-Waddress"void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */int i;voidfoo (){ if (&i) /* { dg-error ".* will always evaluate as 'true'" } */ grill ();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -