History

div fixes

- Makefile: don't produce unknown targets - libtcc.c: tcc_set_linker(): improve parser - tcc.h: tcc_internal_error(): don't record __FILE__ (for privacy reasons) - tccgen.c: - reject pointer + float operation - use 'int level' for builtin_frame/return_address - save_regs(): remove VT_ARRAY (confuses riscv64-gen) - tccpe.c: store just basename of loaded dlls (rather than full path) - tccpp.c: remove unused TAL defines - *-link.c: add missing ST_FUNC - i386-gen.c: fix thiscall - riscv64-asm.c/arm-asm.c: stay simple C89 - avoid .designators, decl after statement - avoid multiple instances of same static const objects - use skip() instead of next() & expect() - use cstr_printf() instead of snprintf() & cstr_cat() - tcc_error(), expect(): never return

grischka committed 2 years ago

Commit 6b78e561 parent 3b943be20 files · +227 −508Browse files

Showing the changes to tests (3 of 20 files). Show all

Unified · Split

3 files
  1. tests/tests2/60_errors_and_warnings.c +7 −0
  2. tests/tests2/60_errors_and_warnings.expect +3 −0
  3. tests/thiscall/thiscall-test.c +0 −17
tests/tests2/60_errors_and_warnings.c+7−0
@@ -483,4 +483,11 @@ struct A { · 482 unmodified lines
483483 # if X(1,2) //undefined function macro
484484 # endif
485485
486+#elif defined test_pointer_plus_double
487+
488+int *invalid_operation(int *p, double d)
489+{
490+ return p + d;
491+}
492+
486493 #endif
tests/tests2/60_errors_and_warnings.expect+3−0
@@ -237,3 +237,6 @@ arg[1] = "Y" · 236 unmodified lines
237237
238238 [test_pp_error_2]
239239 60_errors_and_warnings.c:483: error: bad preprocessor expression: #if 0 ( 1 , 2 )
240+
241+[test_pointer_plus_double]
242+60_errors_and_warnings.c:490: error: invalid operand types for binary operation
tests/thiscall/thiscall-test.c+0−17
@@ -1,17 +0,0 @@
1−#ifndef __thiscall
2− #define __thiscall __attribute__((thiscall))
3−#endif
4−#ifndef __cdecl
5− #define __cdecl __attribute__((cdecl))
6−#endif
7−#ifndef __stdcall
8− #define __stdcall __attribute__((stdcall))
9−#endif
10−
11−void ( __thiscall * const thisCall1 ) ( void * _this, int a ) = ( void ( __thiscall * ) ( void * _this, int a ) ) 0x4788a0;
12−
13−int main() {
14− thisCall1((void*) 0xDEADBEEF, 1000);
15−
16− return 1;
17−}

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