Subject: lang/gpc compilation issues
To: None <pkgsrc-users@netbsd.org>
From: Marco Trillo <marcotrillo@gmail.com>
List: pkgsrc-users
Date: 11/11/2007 12:46:11
Hi all,

I built lang/gpc with recent pkgsrc snapshot and NetBSD 4.0_RC3 (i386,
with GCC 4).
The build fails with compilation errors on some file (gcc/p/module.c).
The errors are 'invalid lvalue in assignment' in three lines of the
file.
The lines look like this:

TREE_CODE (t) = FOO;

and the TREE_CODE(x) definition looks like this:
#define TREE_CODE(x) ((enum tree_code) ((x)->common.code))

To workaround the issue I changed the TREE_CODE(t) lines to
t->common.code; but adding a flag to the compiler to be more
permissive (because that probably compiled fine with GCC 3 and 2) is
probably better.

-- 

     -Marco