werror-1.c
来自「用于进行gcc测试」· C语言 代码 · 共 22 行
C
22 行
/* { 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 + =
减小字号Ctrl + -
显示快捷键?