It looks like the Intel compiler is pickier about 'select' than most. It's so picky that it seems to be rejecting valid C programs, as 'restrict' is not part of the function type; see C11 section 6.7.6.3 paragraph 15. You might want to file a bug report with Intel.

In the meantime, does the attached patch work around the problem?

From d5f0fa73d5ee3577040130c232ae21181af968da Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email protected]>
Date: Mon, 14 Mar 2016 13:17:06 -0700
Subject: [PATCH] select: try to port to 2016.1.150 compiler
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problem reported by Balázs Hajgató in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00026.html
* lib/sys_select.in.h (select): Use 'restrict' on arguments where
POSIX specifies 'restrict'.
---
 ChangeLog           | 8 ++++++++
 lib/sys_select.in.h | 9 ++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 317c50a..d89c5f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-03-14  Paul Eggert  <[email protected]>
+
+       select: try to port to 2016.1.150 compiler
+       Problem reported by Balázs Hajgató in:
+       http://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00026.html
+       * lib/sys_select.in.h (select): Use 'restrict' on arguments where
+       POSIX specifies 'restrict'.
+
 2016-03-13  Paul Eggert  <[email protected]>
 
        localename-tests: memory allocation fixes
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index a813f9c..d6d3f9f 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -289,12 +289,15 @@ _GL_WARN_ON_USE (pselect, "pselect is not portable - "
 #   define select rpl_select
 #  endif
 _GL_FUNCDECL_RPL (select, int,
-                  (int, fd_set *, fd_set *, fd_set *, struct timeval *));
+                  (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+                   struct timeval *restrict));
 _GL_CXXALIAS_RPL (select, int,
-                  (int, fd_set *, fd_set *, fd_set *, struct timeval *));
+                  (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+                   struct timeval *restrict));
 # else
 _GL_CXXALIAS_SYS (select, int,
-                  (int, fd_set *, fd_set *, fd_set *, struct timeval *));
+                  (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+                   struct timeval *restrict));
 # endif
 _GL_CXXALIASWARN (select);
 #elif @HAVE_WINSOCK2_H@
-- 
2.5.0

Reply via email to