You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for catching that! I like your idea for a fix. Since you already have an environment set up to reproduce the issue, would you mind producing a PR that builds with GCC 11.1?
Use of the local variable names true and false causes conflict with stdbool.h.
Easiest solution is to rename them _true and _false.
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../include/urweb -I./../../include/urweb -Wall -Wunused-parameter -Werror -Wno-format-security -Wno-deprecated-declarations -U_FORTIFY_SOURCE -pthread -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -MT urweb.lo -MD -MP -MF .deps/urweb.Tpo -c urweb.c -fPIC -DPIC -o .libs/urweb.o
In file included from /usr/include/unicode/utf8.h:37,
from urweb.c:23:
urweb.c: In function ‘uw_Basis_ensqlBool’:
urweb.c:3092:23: error: expected identifier or ‘(’ before numeric constant
3092 | static uw_Basis_int true = 1;
| ^~~~
urweb.c:3093:23: error: expected identifier or ‘(’ before numeric constant
3093 | static uw_Basis_int false = 0;
| ^~~~~
urweb.c:3096:20: error: lvalue required as unary ‘&’ operand
3096 | return (char *)&false;
| ^
urweb.c:3098:20: error: lvalue required as unary ‘&’ operand
3098 | return (char *)&true;
| ^
In file included from /usr/include/unicode/utf8.h:37,
from urweb.c:23:
urweb.c: In function ‘uw_Basis_stringToBool’:
urweb.c:3196:24: error: expected identifier or ‘(’ before numeric constant
3196 | static uw_Basis_bool true = uw_Basis_True;
| ^~~~
urweb.c:3197:24: error: expected identifier or ‘(’ before numeric constant
3197 | static uw_Basis_bool false = uw_Basis_False;
| ^~~~~
urweb.c:3200:12: error: lvalue required as unary ‘&’ operand
3200 | return &true;
| ^
urweb.c:3202:12: error: lvalue required as unary ‘&’ operand
3202 | return &false;
| ^
urweb.c: In function ‘uw_Basis_ensqlBool’:
urweb.c:3099:1: error: control reaches end of non-void function [-Werror=return-type]
3099 | }
| ^
urweb.c: In function ‘uw_Basis_stringToBool’:
urweb.c:3205:1: error: control reaches end of non-void function [-Werror=return-type]
3205 | }
| ^
cc1: all warnings being treated as errors
The text was updated successfully, but these errors were encountered: