History

Ignore some more attributes

Detected when using -Wunsupported

herman ten brugge committed 1 year ago

Commit ab2ce3b1 parent cdebce32 files · +25 −1Browse files

Unified · Split

2 files
  1. tccgen.c +18 −1
  2. tcctok.h +7 −0
tccgen.c+18−1
@@ -4013,11 +4013,27 @@ redo: · 4012 unmodified lines
4013 case TOK_NODEBUG2:4013 case TOK_NODEBUG2:
4014 ad->a.nodebug = 1;4014 ad->a.nodebug = 1;
4015 break;4015 break;
4016 case TOK_USED1:
4017 case TOK_USED2:
4016 case TOK_UNUSED1:4018 case TOK_UNUSED1:
4017 case TOK_UNUSED2:4019 case TOK_UNUSED2:
4018 /* currently, no need to handle it because tcc does not4020 /* currently, no need to handle it because tcc does not
4019 track unused objects */4021 track used/unused objects */
4020 break;4022 break;
4023 case TOK_CONST1:
4024 case TOK_CONST2:
4025 case TOK_CONST3:
4026 case TOK_PURE1:
4027 case TOK_PURE2:
4028 /* ignored */
4029 break;
4030 case TOK_NOINLINE:
4031 /* ignored */
4032 break;
4033 case TOK_FORMAT1:
4034 case TOK_FORMAT2:
4035 /* ignored */
4036 goto skip_param;
4021 case TOK_NORETURN1:4037 case TOK_NORETURN1:
4022 case TOK_NORETURN2:4038 case TOK_NORETURN2:
4023 ad->f.func_noreturn = 1;4039 ad->f.func_noreturn = 1;
@@ -4091,6 +4107,7 @@ redo: · 67 unmodified lines
4091 default:4107 default:
4092 tcc_warning_c(warn_unsupported)("'%s' attribute ignored", get_tok_str(t, NULL));4108 tcc_warning_c(warn_unsupported)("'%s' attribute ignored", get_tok_str(t, NULL));
4093 /* skip parameters */4109 /* skip parameters */
4110skip_param:
4094 if (tok == '(') {4111 if (tok == '(') {
4095 int parenthesis = 0;4112 int parenthesis = 0;
4096 do {4113 do {
tcctok.h+7−0
@@ -23,6 +23,8 @@ · 22 unmodified lines
23 DEF(TOK_CONST1, "const")23 DEF(TOK_CONST1, "const")
24 DEF(TOK_CONST2, "__const") /* gcc keyword */24 DEF(TOK_CONST2, "__const") /* gcc keyword */
25 DEF(TOK_CONST3, "__const__") /* gcc keyword */25 DEF(TOK_CONST3, "__const__") /* gcc keyword */
26 DEF(TOK_PURE1, "pure")
27 DEF(TOK_PURE2, "__pure__")
26 DEF(TOK_VOLATILE1, "volatile")28 DEF(TOK_VOLATILE1, "volatile")
27 DEF(TOK_VOLATILE2, "__volatile") /* gcc keyword */29 DEF(TOK_VOLATILE2, "__volatile") /* gcc keyword */
28 DEF(TOK_VOLATILE3, "__volatile__") /* gcc keyword */30 DEF(TOK_VOLATILE3, "__volatile__") /* gcc keyword */
@@ -114,8 +116,12 @@ · 85 unmodified lines
114 DEF(TOK_WEAK2, "__weak__")116 DEF(TOK_WEAK2, "__weak__")
115 DEF(TOK_ALIAS1, "alias")117 DEF(TOK_ALIAS1, "alias")
116 DEF(TOK_ALIAS2, "__alias__")118 DEF(TOK_ALIAS2, "__alias__")
119 DEF(TOK_USED1, "used")
120 DEF(TOK_USED2, "__used__")
117 DEF(TOK_UNUSED1, "unused")121 DEF(TOK_UNUSED1, "unused")
118 DEF(TOK_UNUSED2, "__unused__")122 DEF(TOK_UNUSED2, "__unused__")
123 DEF(TOK_FORMAT1, "format")
124 DEF(TOK_FORMAT2, "__format__")
119 DEF(TOK_NODEBUG1, "nodebug")125 DEF(TOK_NODEBUG1, "nodebug")
120 DEF(TOK_NODEBUG2, "__nodebug__")126 DEF(TOK_NODEBUG2, "__nodebug__")
121 DEF(TOK_CDECL1, "cdecl")127 DEF(TOK_CDECL1, "cdecl")
@@ -140,6 +146,7 @@ · 18 unmodified lines
140 DEF(TOK_DESTRUCTOR2, "__destructor__")146 DEF(TOK_DESTRUCTOR2, "__destructor__")
141 DEF(TOK_ALWAYS_INLINE1, "always_inline")147 DEF(TOK_ALWAYS_INLINE1, "always_inline")
142 DEF(TOK_ALWAYS_INLINE2, "__always_inline__")148 DEF(TOK_ALWAYS_INLINE2, "__always_inline__")
149 DEF(TOK_NOINLINE, "__noinline__")
143 150
144 DEF(TOK_MODE, "__mode__")151 DEF(TOK_MODE, "__mode__")
145 DEF(TOK_MODE_QI, "__QI__")152 DEF(TOK_MODE_QI, "__QI__")

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t