builtin-1.c

来自「this is a gcc file, you can download it 」· C语言 代码 · 共 23 行

C
23
字号
/* Test for format extensions.  Test that the __builtin functions get their   default attributes even with -ffreestanding.*//* Origin: Joseph Myers <jsm28@cam.ac.uk> *//* { dg-do compile } *//* { dg-options "-std=gnu99 -Wformat -ffreestanding" } */#include "format.h"voidfoo (int i){  __builtin_fprintf (stdout, "%d", i);  __builtin_fprintf (stdout, "%ld", i); /* { dg-warning "format" "__builtin_fprintf" } */  __builtin_printf ("%d", i);  __builtin_printf ("%ld", i); /* { dg-warning "format" "__builtin_printf" } */  __builtin_fprintf_unlocked (stdout, "%d", i);  __builtin_fprintf_unlocked (stdout, "%ld", i); /* { dg-warning "format" "__builtin_fprintf_unlocked" } */  __builtin_printf_unlocked ("%d", i);  __builtin_printf_unlocked ("%ld", i); /* { dg-warning "format" "__builtin_printf_unlocked" } */}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?