Skip to content

Commit 0dd1905

Browse files
authored
[Prolangs-C] Fix "conflicting types" build errors (#223)
Correcting these function declarations addresses these compilation errors: ``` llvm-test-suite/MultiSource/Benchmarks/Prolangs-C/loader/sym_tab.c:40:5: error: conflicting types for 'INSERT_IN_SYM_TAB' 40 | int INSERT_IN_SYM_TAB(char *MODULE,char *LABEL,int LOCATION,enum kind TYPE, | ^ llvm-test-suite/MultiSource/Benchmarks/Prolangs-C/loader/sym_tab.h:52:12: note: previous declaration is here 52 | extern int INSERT_IN_SYM_TAB(); | ^ 1 error generated. llvm-test-suite/MultiSource/Benchmarks/Prolangs-C/assembler/sym_tab.c:40:5: error: conflicting types for 'INSERT_IN_SYM_TAB' 40 | int INSERT_IN_SYM_TAB(char *MODULE,char *LABEL,int LOCATION,enum kind TYPE, | ^ llvm-test-suite/MultiSource/Benchmarks/Prolangs-C/assembler/sym_tab.h:52:12: note: previous declaration is here 52 | extern int INSERT_IN_SYM_TAB(); | ^ 1 error generated. ``` Since clang 15.x, this has been an error for C programs.
1 parent 1592d36 commit 0dd1905

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

MultiSource/Benchmarks/Prolangs-C/assembler/sym_tab.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ extern struct SYMBOL_TABLE_ENTRY *LOOK_UP_SYMBOL();
4949
/* If <MODULE,LABEL> pair is not in the symbol table, put it there and */
5050
/* TRUE (integer 1). Otherwise return FALSE (integer 0). */
5151
/* Puts onto front of the linked list. */
52-
extern int INSERT_IN_SYM_TAB();
52+
extern int INSERT_IN_SYM_TAB(char *, char *, int, enum kind, SYMBOL_TABLE *);
5353

5454

MultiSource/Benchmarks/Prolangs-C/loader/sym_tab.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ extern struct SYMBOL_TABLE_ENTRY *LOOK_UP_SYMBOL();
4949
/* If <MODULE,LABEL> pair is not in the symbol table, put it there and */
5050
/* TRUE (integer 1). Otherwise return FALSE (integer 0). */
5151
/* Puts onto front of the linked list. */
52-
extern int INSERT_IN_SYM_TAB();
52+
extern int INSERT_IN_SYM_TAB(char *, char *, int, enum kind, SYMBOL_TABLE *);
5353

5454

0 commit comments

Comments
 (0)