History

win: ignore dllimport/dllexport for typedef with warning instead of error

Keep the same as gcc and clang. The usage exists in MinGW-w64 headers.

YX Hao committed 7 years ago

Commit 756e7661 parent a4997bf1 file · +7 −3Browse files

Unified · Split

tccgen.c+7−3
@@ -7685,9 +7685,13 @@ static int decl0(int l, int is_for_loop_init, Sym *func_sym) · 7684 unmodified lines
7685 7685
7686#ifdef TCC_TARGET_PE7686#ifdef TCC_TARGET_PE
7687 if (ad.a.dllimport || ad.a.dllexport) {7687 if (ad.a.dllimport || ad.a.dllexport) {
7688 if (type.t & (VT_STATIC|VT_TYPEDEF))7688 if (type.t & VT_STATIC)
7689 tcc_error("cannot have dll linkage with static or typedef");7689 tcc_error("cannot have dll linkage with static");
7690 if (ad.a.dllimport) {7690 if (type.t & VT_TYPEDEF) {
7691 tcc_warning("'%s' attribute ignored for typedef",
7692 ad.a.dllimport ? (ad.a.dllimport = 0, "dllimport") :
7693 (ad.a.dllexport = 0, "dllexport"));
7694 } else if (ad.a.dllimport) {
7691 if ((type.t & VT_BTYPE) == VT_FUNC)7695 if ((type.t & VT_BTYPE) == VT_FUNC)
7692 ad.a.dllimport = 0;7696 ad.a.dllimport = 0;
7693 else7697 else

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