History

Fix incorrect use of basic type as bitflags.

Fix incorrect use of basic types as bitflags and inefficiency in commit cf36410e30b3c18be6c556158b2d0d0938f5b77d

Thomas Preud'homme committed 15 years ago

Commit c2340021 parent cf364101 file · +3 −4Browse files

Unified · Split

tccgen.c+3−4
@@ -5423,10 +5423,6 @@ ST_FUNC void decl(int l) · 5422 unmodified lines
54235423 while (1) { /* iterate thru each declaration */
54245424 type = btype;
54255425 type_decl(&type, &ad, &v, TYPE_DIRECT);
5426− if (((type.t & (VT_STATIC|VT_FUNC)) == (VT_STATIC|VT_FUNC))
5427− && (l == VT_LOCAL)) {
5428− error("Function without file scope cannot be static");
5429− }
54305426 #if 0
54315427 {
54325428 char buf[500];
@@ -5435,6 +5431,9 @@ ST_FUNC void decl(int l) · 2 unmodified lines
54355431 }
54365432 #endif
54375433 if ((type.t & VT_BTYPE) == VT_FUNC) {
5434+ if ((type.t & VT_STATIC) && (l == VT_LOCAL)) {
5435+ error("function without file scope cannot be static");
5436+ }
54385437 /* if old style function prototype, we accept a
54395438 declaration list */
54405439 sym = type.ref;

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