[prev in list] [next in list] [prev in thread] [next in thread]
List: netbsd-tech-pkg
Subject: Re: Question regarding C syntax
From: Hubert Feyrer <hubert () feyrer ! de>
Date: 2006-09-16 21:11:13
Message-ID: Pine.LNX.4.64.0609162309510.23678 () m2s05 ! vlinux ! de
[Download RAW message or body]
On Sat, 16 Sep 2006, Georg Schwarz wrote:
> static Package pkg_config_package = {
> .key = PACKAGE,
...
> This code does not compile with the IRIX IDO cc (other non-gcc compilers
> might also be affected).
> Is it OK to change it into the following form?
Probably.
The syntax above is not in c89 ("ansi c"), but it's part of c99.
If you have a C99 compiler available, try using that.
You can test this with gcc, too:
miyu% gcc -pedantic -std=c89 s.c -o s
s.c: In function 'main':
s.c:11: warning: ISO C90 forbids specifying subobject to initialize
s.c:12: warning: ISO C90 forbids specifying subobject to initialize
s.c:13: warning: ISO C90 forbids specifying subobject to initialize
miyu% gcc -pedantic -std=c99 s.c -o s
miyu%
- Hubert
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic