History

tcc_internal_error: print function with __func__.

Though __func__ was introduced in C99, this is preferable to __FUNCTION__, an obsolete GCC extension. Found with gcc -Wpedantic.

John Scott committed 6 years ago

Commit 53587ee1 parent 558c6f51 file · +2 −2Browse files

Unified · Split

tcc.h+2−2
@@ -1061,7 +1061,7 @@ struct filespec { · 1060 unmodified lines
1061#define TOK_TWOSHARPS 0xa3 /* ## preprocessing token */1061#define TOK_TWOSHARPS 0xa3 /* ## preprocessing token */
1062#define TOK_PLCHLDR 0xa4 /* placeholder token as defined in C99 */1062#define TOK_PLCHLDR 0xa4 /* placeholder token as defined in C99 */
1063#define TOK_NOSUBST 0xa5 /* means following token has already been pp'd */1063#define TOK_NOSUBST 0xa5 /* means following token has already been pp'd */
1064#define TOK_PPJOIN 0xa6 /* A '##' in the right position to mean pasting */ 1064#define TOK_PPJOIN 0xa6 /* A '##' in the right position to mean pasting */
1065 1065
1066/* assignment operators */1066/* assignment operators */
1067#define TOK_A_ADD 0xb01067#define TOK_A_ADD 0xb0
@@ -1238,7 +1238,7 @@ PUB_FUNC void _tcc_error_noabort(const char *fmt, ...) PRINTF_LIKE(1,2); · 170 unmodified lines
1238PUB_FUNC NORETURN void _tcc_error(const char *fmt, ...) PRINTF_LIKE(1,2);1238PUB_FUNC NORETURN void _tcc_error(const char *fmt, ...) PRINTF_LIKE(1,2);
1239PUB_FUNC void _tcc_warning(const char *fmt, ...) PRINTF_LIKE(1,2);1239PUB_FUNC void _tcc_warning(const char *fmt, ...) PRINTF_LIKE(1,2);
1240#define tcc_internal_error(msg) tcc_error("internal compiler error\n"\1240#define tcc_internal_error(msg) tcc_error("internal compiler error\n"\
1241 "%s:%d: in %s(): " msg, __FILE__,__LINE__,__FUNCTION__)1241 "%s:%d: in %s(): " msg, __FILE__,__LINE__,__func__)
1242 1242
1243/* other utilities */1243/* other utilities */
1244ST_FUNC void dynarray_add(void *ptab, int *nb_ptr, void *data);1244ST_FUNC void dynarray_add(void *ptab, int *nb_ptr, void *data);

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