This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix build warnings in regex.c, bug-regex20.c,bug-regex33.c
On Tue, Feb 26, 2013 at 12:29:32AM -0800, Paul Eggert wrote:
> The idea is to define __attribute__ to be a no-op for GCC versions before
> 3.1. The code I sent you does that; the code you sent me changes at 3.0, not
> 3.1. For non-GCC compilers, __GNUC__ evaluates to 0 in an #if.
>
> At this point I expect nobody uses GCC 3.0 any more so the distinction
> may be a who-cares now.
Right, thanks. I've installed this as you since it's your code.
Siddhesh
commit b7688c42e7cca0c24889f3a8f9b685783661fb24
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue Feb 26 14:17:12 2013 +0530
Bring back definition of __attribute__ for non-gcc and older gcc
gnulib copies this file over and needs it.
diff --git a/ChangeLog b/ChangeLog
index 8450c3c..cbf4083 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-26 Paul Eggert <eggert@cs.ucla.edu>
+
+ * posix/regex_internal.h [__GNUC__ < 3 + (__GNUC_MINOR__ < 1]:
+ Define __attribute__.
+
2013-02-26 Siddhesh Poyarekar <siddhesh@redhat.com>
* locale/elem-hash.h (elem_hash): Mark as pure and possibly
diff --git a/posix/regex_internal.h b/posix/regex_internal.h
index 0521f74..3c94fbe 100644
--- a/posix/regex_internal.h
+++ b/posix/regex_internal.h
@@ -121,6 +121,10 @@
# define attribute_hidden
#endif /* not _LIBC */
+#if __GNUC__ < 3 + (__GNUC_MINOR__ < 1)
+# define __attribute__(arg)
+#endif
+
extern const char __re_error_msgid[] attribute_hidden;
extern const size_t __re_error_msgid_idx[] attribute_hidden;
- References:
- [PATCH] Fix build warnings in regex.c, bug-regex20.c, bug-regex33.c
- Re: [PATCH] Fix build warnings in regex.c, bug-regex20.c, bug-regex33.c
- Re: [PATCH] Fix build warnings in regex.c, bug-regex20.c, bug-regex33.c
- Re: [PATCH] Fix build warnings in regex.c, bug-regex20.c, bug-regex33.c
- Re: [PATCH] Fix build warnings in regex.c, bug-regex20.c,bug-regex33.c
- Re: [PATCH] Fix build warnings in regex.c, bug-regex20.c, bug-regex33.c
- Re: [PATCH] Fix build warnings in regex.c, bug-regex20.c,bug-regex33.c
- Re: [PATCH] Fix build warnings in regex.c, bug-regex20.c, bug-regex33.c