GNOME Bugzilla – Bug 669344
Don't use 'restrict' keyword as variable name
Last modified: 2012-02-03 23:23:11 UTC
Created attachment 206728 [details] [review] restrict -> a_restrict Build of at-spi2-core 2.2.3 fails with clang: libtool: compile: clang -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I/usr/local/include -I/usr/local/include/dbus-1.0 -I/usr/local/include/dbus-1.0/include -I/usr/local/include/glib-2.0 -I../registryd -I.. -O2 -pipe -fno-strict-aliasing -Werror-implicit-function-declaration -MT libatspi_la-atspi-collection.lo -MD -MP -MF .deps/libatspi_la-atspi-collection.Tpo -c atspi-collection.c -fPIC -DPIC -o .libs/libatspi_la-atspi-collection.o atspi-collection.c:190:40: error: restrict requires a pointer or reference ('gboolean' (aka 'int') is invalid) gboolean restrict, ~~~~~~~~~^~~~~~~~ atspi-collection.c:190:48: error: parameter name omitted gboolean restrict, ^ atspi-collection.c:199:28: error: expected expression dbus_bool_t d_restrict = restrict;
Of course, using -std=gnu89 helps here, just thought it would be better to change this anyway.
I'd rather just rename the parameter, so I've just pushed 1fe074, renaming it to limit_scope. Thanks for the report.