Re: Graphite header order

22 views
Skip to first unread message

Sebastian Pop

unread,
Nov 20, 2015, 11:15:29 AM11/20/15
to David Edelsohn, Sven Verdoolaege, Sebastian Pop, GCC Development, isl-dev...@googlegroups.com
On Fri, Nov 20, 2015 at 9:31 AM, David Edelsohn <dje...@gmail.com> wrote:
> Sebastian,
>
> I have tried to build GCC with Graphite and ISL on AIX and encountered
> two problems:
>
> (1) isl/ctx.h
>
> typedef enum {
> isl_stat_error = -1,
> isl_stat_ok = 0,
> } isl_stat;
>
> GCC complains about the comma in "isl_stat_ok = 0,". This seems like
> a general bug that should appear on all targets.

Sven, is there a way to fix this problem in ISL 0.15?

Thanks,
Sebastian

Sven Verdoolaege

unread,
Nov 20, 2015, 11:24:08 AM11/20/15
to Sebastian Pop, David Edelsohn, Sebastian Pop, GCC Development, isl-dev...@googlegroups.com
Which version of gcc complains about the comma and why does it complain?
AFAIU, the final comma is perfectly valid in C99.

skimo

Sebastian Pop

unread,
Nov 20, 2015, 11:32:16 AM11/20/15
to sven.ver...@gmail.com, David Edelsohn, Sebastian Pop, GCC Development, isl-dev...@googlegroups.com
On my system, gcc is compiled by g++ -std=gnu++98, then bootstrap uses
-std=gnu++11.

Sebastian

David Edelsohn

unread,
Nov 20, 2015, 11:37:43 AM11/20/15
to Sebastian Pop, sven.ver...@gmail.com, Sebastian Pop, GCC Development, isl-dev...@googlegroups.com
Sven,

It's a C++ warning that is treated as an error during the GCC build.
This presumably is a problem on all configurations of GCC.

In file included from
/gsa/yktgsa/home/e/d/edelsohn/install/include/isl/list.h:13:0,
from
/gsa/yktgsa/home/e/d/edelsohn/install/include/isl/aff_type.h:4,
from
/gsa/yktgsa/home/e/d/edelsohn/install/include/isl/local_space.h:4,
from
/gsa/yktgsa/home/e/d/edelsohn/install/include/isl/constraint.h:13,
from /nasfarm/edelsohn/src/src/gcc/graphite.c:36:
/gsa/yktgsa/home/e/d/edelsohn/install/include/isl/ctx.h:83:17:
warning: comma at end of enumerator list [-Wpedantic]
isl_stat_ok = 0,
^

Thanks, David

skim...@kotnet.org

unread,
Nov 20, 2015, 5:26:26 PM11/20/15
to isl-dev...@googlegroups.com, Sebastian Pop
From: Sven Verdoolaege <sk...@kotnet.org>

The comma is valid in C99, but not in C++98, while the header
containing the enum may get included from C++ source code by users.
In particular, g++ complains about the comma when using -std=gnu++98 -pedantic.

Reported-by: Sebastian Pop <seb...@gmail.com>
Signed-off-by: Sven Verdoolaege <sk...@kotnet.org>
---
include/isl/ctx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/isl/ctx.h b/include/isl/ctx.h
index 6cd26a1..04c89c8 100644
--- a/include/isl/ctx.h
+++ b/include/isl/ctx.h
@@ -80,7 +80,7 @@ enum isl_error {
};
typedef enum {
isl_stat_error = -1,
- isl_stat_ok = 0,
+ isl_stat_ok = 0
} isl_stat;
typedef enum {
isl_bool_error = -1,
--
1.9.1

Sven Verdoolaege

unread,
Nov 20, 2015, 5:28:49 PM11/20/15
to Sebastian Pop, David Edelsohn, Sebastian Pop, isl-dev...@googlegroups.com
On Fri, Nov 20, 2015 at 10:14:47AM -0600, Sebastian Pop wrote:
> Sven, is there a way to fix this problem in ISL 0.15?

isl-0.15 has been out for a while, but if I ever release an isl-0.15.1,
it can go in.

On Fri, Nov 20, 2015 at 11:37:42AM -0500, David Edelsohn wrote:
> It's a C++ warning that is treated as an error during the GCC build.
> This presumably is a problem on all configurations of GCC.
>
> In file included from
> /gsa/yktgsa/home/e/d/edelsohn/install/include/isl/list.h:13:0,
> from
> /gsa/yktgsa/home/e/d/edelsohn/install/include/isl/aff_type.h:4,
> from
> /gsa/yktgsa/home/e/d/edelsohn/install/include/isl/local_space.h:4,
> from
> /gsa/yktgsa/home/e/d/edelsohn/install/include/isl/constraint.h:13,
> from /nasfarm/edelsohn/src/src/gcc/graphite.c:36:
> /gsa/yktgsa/home/e/d/edelsohn/install/include/isl/ctx.h:83:17:
> warning: comma at end of enumerator list [-Wpedantic]
> isl_stat_ok = 0,
> ^

OK, I can reproduce it with "g++ -std=gnu++98 -pedantic".

Thanks,

skimo

Sebastian Pop

unread,
Nov 20, 2015, 10:40:22 PM11/20/15
to skim...@kotnet.org, isl-dev...@googlegroups.com
On Fri, Nov 20, 2015 at 4:26 PM, <skim...@kotnet.org> wrote:
> From: Sven Verdoolaege <sk...@kotnet.org>
>
> The comma is valid in C99, but not in C++98, while the header
> containing the enum may get included from C++ source code by users.
> In particular, g++ complains about the comma when using -std=gnu++98 -pedantic.
>

Thanks Sven for the quick fix.
Do you have plans to release an ISL 0.15.1 with this change?

Sebastian

Sven Verdoolaege

unread,
Nov 23, 2015, 4:33:37 AM11/23/15
to Sebastian Pop, isl-dev...@googlegroups.com
On Fri, Nov 20, 2015 at 09:39:42PM -0600, Sebastian Pop wrote:
> Do you have plans to release an ISL 0.15.1 with this change?

I have no specific plans at the moment, but it could be considered
if someone were to request such a release.

skimo
Reply all
Reply to author
Forward
0 new messages