⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 enum5.c

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 C
字号:
// Copyright (C) 2001 Free Software Foundation, Inc.// Contributed by Ben Elliston <bje@redhat.com>// PR 80: Packed enums use minimum required storage.// excess errors test - XFAIL *-*-*extern "C" void abort();enum numbers { one, two, three } __attribute__ ((packed)) nums;enum colours { red = 1000, green, blue } __attribute__ ((packed)) cols;enum __attribute__ ((packed)) conditions { fine, rain, cloudy } forecast;intmain(){  if (sizeof (nums) != 1)    abort ();  if (sizeof (cols) != 2)    abort ();  if (sizeof (forecast) != 1)    abort ();  return 0;}

⌨️ 快捷键说明

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