gcc 11.1.0 warnings in llvmjit_expr.c

From: Erik Rijkers <er(at)xs4all(dot)nl>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: gcc 11.1.0 warnings in llvmjit_expr.c
Date: 2021-04-28 22:07:01
Message-ID: 833107370.1313189.1619647621213@webmailclassic.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

gcc 11.1.0 produces quite a litany of second thoughts when compiling llvmjit_expr.c; is there something in it?

(all 'warning' or 'note')

llvmjit_expr.c: In function ‘llvm_compile_expr’:
llvmjit_expr.c:69:9: warning: ‘build_EvalXFuncInt’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=]
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1553:33: note: in expansion of macro ‘build_EvalXFunc’
1553 | build_EvalXFunc(b, mod, "ExecEvalSQLValueFunction",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: note: referencing argument 7 of type ‘struct LLVMOpaqueValue **’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1553:33: note: in expansion of macro ‘build_EvalXFunc’
1553 | build_EvalXFunc(b, mod, "ExecEvalSQLValueFunction",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:2460:1: note: in a call to function ‘build_EvalXFuncInt’
2460 | build_EvalXFuncInt(LLVMBuilderRef b, LLVMModuleRef mod, const char *funcname,
| ^~~~~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: warning: ‘build_EvalXFuncInt’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=]
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1559:33: note: in expansion of macro ‘build_EvalXFunc’
1559 | build_EvalXFunc(b, mod, "ExecEvalCurrentOfExpr",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: note: referencing argument 7 of type ‘struct LLVMOpaqueValue **’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1559:33: note: in expansion of macro ‘build_EvalXFunc’
1559 | build_EvalXFunc(b, mod, "ExecEvalCurrentOfExpr",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:2460:1: note: in a call to function ‘build_EvalXFuncInt’
2460 | build_EvalXFuncInt(LLVMBuilderRef b, LLVMModuleRef mod, const char *funcname,
| ^~~~~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: warning: ‘build_EvalXFuncInt’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=]
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1565:33: note: in expansion of macro ‘build_EvalXFunc’
1565 | build_EvalXFunc(b, mod, "ExecEvalNextValueExpr",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: note: referencing argument 7 of type ‘struct LLVMOpaqueValue **’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1565:33: note: in expansion of macro ‘build_EvalXFunc’
1565 | build_EvalXFunc(b, mod, "ExecEvalNextValueExpr",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:2460:1: note: in a call to function ‘build_EvalXFuncInt’
2460 | build_EvalXFuncInt(LLVMBuilderRef b, LLVMModuleRef mod, const char *funcname,
| ^~~~~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: warning: ‘build_EvalXFuncInt’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=]
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1571:33: note: in expansion of macro ‘build_EvalXFunc’
1571 | build_EvalXFunc(b, mod, "ExecEvalArrayExpr",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: note: referencing argument 7 of type ‘struct LLVMOpaqueValue **’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1571:33: note: in expansion of macro ‘build_EvalXFunc’
1571 | build_EvalXFunc(b, mod, "ExecEvalArrayExpr",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:2460:1: note: in a call to function ‘build_EvalXFuncInt’
2460 | build_EvalXFuncInt(LLVMBuilderRef b, LLVMModuleRef mod, const char *funcname,
| ^~~~~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: warning: ‘build_EvalXFuncInt’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=]
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1583:33: note: in expansion of macro ‘build_EvalXFunc’
1583 | build_EvalXFunc(b, mod, "ExecEvalRow",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: note: referencing argument 7 of type ‘struct LLVMOpaqueValue **’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1583:33: note: in expansion of macro ‘build_EvalXFunc’
1583 | build_EvalXFunc(b, mod, "ExecEvalRow",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:2460:1: note: in a call to function ‘build_EvalXFuncInt’
2460 | build_EvalXFuncInt(LLVMBuilderRef b, LLVMModuleRef mod, const char *funcname,
| ^~~~~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: warning: ‘build_EvalXFuncInt’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=]
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1738:33: note: in expansion of macro ‘build_EvalXFunc’
1738 | build_EvalXFunc(b, mod, "ExecEvalMinMax",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: note: referencing argument 7 of type ‘struct LLVMOpaqueValue **’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1738:33: note: in expansion of macro ‘build_EvalXFunc’
1738 | build_EvalXFunc(b, mod, "ExecEvalMinMax",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:2460:1: note: in a call to function ‘build_EvalXFuncInt’
2460 | build_EvalXFuncInt(LLVMBuilderRef b, LLVMModuleRef mod, const char *funcname,
| ^~~~~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: warning: ‘build_EvalXFuncInt’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=]
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1816:33: note: in expansion of macro ‘build_EvalXFunc’
1816 | build_EvalXFunc(b, mod, "ExecEvalConstraintNotNull",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: note: referencing argument 7 of type ‘struct LLVMOpaqueValue **’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1816:33: note: in expansion of macro ‘build_EvalXFunc’
1816 | build_EvalXFunc(b, mod, "ExecEvalConstraintNotNull",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:2460:1: note: in a call to function ‘build_EvalXFuncInt’
2460 | build_EvalXFuncInt(LLVMBuilderRef b, LLVMModuleRef mod, const char *funcname,
| ^~~~~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: warning: ‘build_EvalXFuncInt’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=]
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1822:33: note: in expansion of macro ‘build_EvalXFunc’
1822 | build_EvalXFunc(b, mod, "ExecEvalConstraintCheck",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: note: referencing argument 7 of type ‘struct LLVMOpaqueValue **’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1822:33: note: in expansion of macro ‘build_EvalXFunc’
1822 | build_EvalXFunc(b, mod, "ExecEvalConstraintCheck",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:2460:1: note: in a call to function ‘build_EvalXFuncInt’
2460 | build_EvalXFuncInt(LLVMBuilderRef b, LLVMModuleRef mod, const char *funcname,
| ^~~~~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: warning: ‘build_EvalXFuncInt’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=]
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1834:33: note: in expansion of macro ‘build_EvalXFunc’
1834 | build_EvalXFunc(b, mod, "ExecEvalScalarArrayOp",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: note: referencing argument 7 of type ‘struct LLVMOpaqueValue **’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1834:33: note: in expansion of macro ‘build_EvalXFunc’
1834 | build_EvalXFunc(b, mod, "ExecEvalScalarArrayOp",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:2460:1: note: in a call to function ‘build_EvalXFuncInt’
2460 | build_EvalXFuncInt(LLVMBuilderRef b, LLVMModuleRef mod, const char *funcname,
| ^~~~~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: warning: ‘build_EvalXFuncInt’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=]
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1846:33: note: in expansion of macro ‘build_EvalXFunc’
1846 | build_EvalXFunc(b, mod, "ExecEvalXmlExpr",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: note: referencing argument 7 of type ‘struct LLVMOpaqueValue **’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1846:33: note: in expansion of macro ‘build_EvalXFunc’
1846 | build_EvalXFunc(b, mod, "ExecEvalXmlExpr",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:2460:1: note: in a call to function ‘build_EvalXFuncInt’
2460 | build_EvalXFuncInt(LLVMBuilderRef b, LLVMModuleRef mod, const char *funcname,
| ^~~~~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: warning: ‘build_EvalXFuncInt’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=]
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1872:33: note: in expansion of macro ‘build_EvalXFunc’
1872 | build_EvalXFunc(b, mod, "ExecEvalGroupingFunc",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:69:9: note: referencing argument 7 of type ‘struct LLVMOpaqueValue **’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 | lengthof(((LLVMValueRef[]){__VA_ARGS__})), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 | ((LLVMValueRef[]){__VA_ARGS__}))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit_expr.c:1872:33: note: in expansion of macro ‘build_EvalXFunc’
1872 | build_EvalXFunc(b, mod, "ExecEvalGroupingFunc",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:2460:1: note: in a call to function ‘build_EvalXFuncInt’
2460 | build_EvalXFuncInt(LLVMBuilderRef b, LLVMModuleRef mod, const char *funcname,
| ^~~~~~~~~~~~~~~~~~

Erik Rijkers

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2021-04-28 22:46:14 Re: WIP: WAL prefetch (another approach)
Previous Message Andrew Dunstan 2021-04-28 21:55:54 Re: SQL/JSON: functions