[flang-commits] [flang] 6bcafce - [flang][Runtime] Use proper prototypes in Fortran_main. NFCI
Diana Picus via flang-commits
flang-commits at lists.llvm.org
Wed May 18 01:04:22 PDT 2022
Author: Diana Picus
Date: 2022-05-18T08:04:09Z
New Revision: 6bcafce103a4d759fd9acdc472bb2c8d0b2c859c
URL: https://github.com/llvm/llvm-project/commit/6bcafce103a4d759fd9acdc472bb2c8d0b2c859c
DIFF: https://github.com/llvm/llvm-project/commit/6bcafce103a4d759fd9acdc472bb2c8d0b2c859c.diff
LOG: [flang][Runtime] Use proper prototypes in Fortran_main. NFCI
This is compiled as C code, so it's a good idea to be explicit about the
prototype. Clang complains about this when -Wstrict-prototypes is used.
Differential Revision: https://reviews.llvm.org/D125672
Added:
Modified:
flang/include/flang/Runtime/main.h
flang/runtime/FortranMain/Fortran_main.c
Removed:
################################################################################
diff --git a/flang/include/flang/Runtime/main.h b/flang/include/flang/Runtime/main.h
index 50bc46e2e8ee9..e3dcbaf7d0533 100644
--- a/flang/include/flang/Runtime/main.h
+++ b/flang/include/flang/Runtime/main.h
@@ -14,7 +14,7 @@
FORTRAN_EXTERN_C_BEGIN
void RTNAME(ProgramStart)(int, const char *[], const char *[]);
-void RTNAME(ByteswapOption)(); // -byteswapio
+void RTNAME(ByteswapOption)(void); // -byteswapio
FORTRAN_EXTERN_C_END
#endif // FORTRAN_RUNTIME_MAIN_H_
diff --git a/flang/runtime/FortranMain/Fortran_main.c b/flang/runtime/FortranMain/Fortran_main.c
index 6a095ee5411d4..0c26a9db966cc 100644
--- a/flang/runtime/FortranMain/Fortran_main.c
+++ b/flang/runtime/FortranMain/Fortran_main.c
@@ -10,7 +10,7 @@
#include "flang/Runtime/stop.h"
/* main entry into PROGRAM */
-void _QQmain();
+void _QQmain(void);
/* C main stub */
int main(int argc, const char *argv[], const char *envp[]) {
More information about the flang-commits
mailing list