History

Extend type_to_str

to also print storage-class specifiers.

Michael Matz committed 9 years ago

Commit 328b06a1 parent 182367e1 file · +11 −1Browse files

Unified · Split

tccgen.c+11−1
@@ -2678,7 +2678,7 @@ static void type_to_str(char *buf, int buf_size, · 2677 unmodified lines
2678 char buf1[256];2678 char buf1[256];
2679 const char *tstr;2679 const char *tstr;
2680 2680
2681 t = type->t & VT_TYPE;2681 t = type->t;
2682 bt = t & VT_BTYPE;2682 bt = t & VT_BTYPE;
2683 buf[0] = '\0';2683 buf[0] = '\0';
2684 if (t & VT_CONSTANT)2684 if (t & VT_CONSTANT)
@@ -2689,6 +2689,16 @@ static void type_to_str(char *buf, int buf_size, · 4 unmodified lines
2689 pstrcat(buf, buf_size, "unsigned ");2689 pstrcat(buf, buf_size, "unsigned ");
2690 else if (t & VT_DEFSIGN)2690 else if (t & VT_DEFSIGN)
2691 pstrcat(buf, buf_size, "signed ");2691 pstrcat(buf, buf_size, "signed ");
2692 if (t & VT_EXTERN)
2693 pstrcat(buf, buf_size, "extern ");
2694 if (t & VT_STATIC)
2695 pstrcat(buf, buf_size, "static ");
2696 if (t & VT_TYPEDEF)
2697 pstrcat(buf, buf_size, "typedef ");
2698 if (t & VT_INLINE)
2699 pstrcat(buf, buf_size, "inline ");
2700 buf_size -= strlen(buf);
2701 buf += strlen(buf);
2692 switch(bt) {2702 switch(bt) {
2693 case VT_VOID:2703 case VT_VOID:
2694 tstr = "void";2704 tstr = "void";

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