public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Support for C9X in gcc?
@ 1999-09-03 10:37 Scott Ladd
  1999-09-03 10:43 ` Zack Weinberg
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Scott Ladd @ 1999-09-03 10:37 UTC (permalink / raw)
  To: gcc; +Cc: scott

The current release of gcc -- 2.95.1 -- includes very limited support
for C9X.

Is anyone working on implementing C9X, especially the numeric parts
(complex, inttypes, etc.)?

If not, I'm thinking of volunteering.

(Now we know I'm nuts...)
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-03 10:37 Support for C9X in gcc? Scott Ladd
@ 1999-09-03 10:43 ` Zack Weinberg
  1999-09-30 18:02   ` Zack Weinberg
  1999-09-03 11:44 ` Gavin Romig-Koch
  1999-09-30 18:02 ` Scott Ladd
  2 siblings, 1 reply; 18+ messages in thread
From: Zack Weinberg @ 1999-09-03 10:43 UTC (permalink / raw)
  To: Scott Ladd; +Cc: gcc, scott

Scott Ladd wrote:
> The current release of gcc -- 2.95.1 -- includes very limited support
> for C9X.
> 
> Is anyone working on implementing C9X, especially the numeric parts
> (complex, inttypes, etc.)?

This is largely a library issue, and gcc does not provide the standard
library.  GNU libc 2.1 does include most of the new C9x features, but
it may not work on your platform.

You could help improve the intrinsic support for complex arithmetic,
which is part of gcc and which could use some work.

zw

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Support for C9X in gcc?
  1999-09-03 10:37 Support for C9X in gcc? Scott Ladd
  1999-09-03 10:43 ` Zack Weinberg
@ 1999-09-03 11:44 ` Gavin Romig-Koch
  1999-09-06 23:48   ` Martin v. Loewis
  1999-09-30 18:02   ` Gavin Romig-Koch
  1999-09-30 18:02 ` Scott Ladd
  2 siblings, 2 replies; 18+ messages in thread
From: Gavin Romig-Koch @ 1999-09-03 11:44 UTC (permalink / raw)
  To: Scott Ladd; +Cc: gcc, scott

Scott Ladd writes:
 > The current release of gcc -- 2.95.1 -- includes very limited support
 > for C9X.
 > 
 > Is anyone working on implementing C9X, especially the numeric parts
 > (complex, inttypes, etc.)?
 > 
 > If not, I'm thinking of volunteering.

Great.

As Zack said, most of the C9X work is in the library, but there 
is some compiler work needed.  This work is on my list of things to
do, but so is alot of other stuff :-).  

                                           -gavin...

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-03 11:44 ` Gavin Romig-Koch
@ 1999-09-06 23:48   ` Martin v. Loewis
  1999-09-07  1:08     ` Geoff Keating
                       ` (4 more replies)
  1999-09-30 18:02   ` Gavin Romig-Koch
  1 sibling, 5 replies; 18+ messages in thread
From: Martin v. Loewis @ 1999-09-06 23:48 UTC (permalink / raw)
  To: gavin; +Cc: scottrobertladd, gcc, scott

> As Zack said, most of the C9X work is in the library, but there 
> is some compiler work needed.  This work is on my list of things to
> do, but so is alot of other stuff :-).  

Could we come up with a list, just so that people know what needs to
be done? Currently, I see

- complex (as indicated by Zack),
- preprocessor changes (which ones are needed, which ones are done?),

What else?

Martin

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-06 23:48   ` Martin v. Loewis
@ 1999-09-07  1:08     ` Geoff Keating
  1999-09-30 18:02       ` Geoff Keating
  1999-09-07  1:28     ` Andreas Jaeger
                       ` (3 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Geoff Keating @ 1999-09-07  1:08 UTC (permalink / raw)
  To: egcs

"Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de> writes:

> > As Zack said, most of the C9X work is in the library, but there 
> > is some compiler work needed.  This work is on my list of things to
> > do, but so is alot of other stuff :-).  
> 
> Could we come up with a list, just so that people know what needs to
> be done? Currently, I see
> 
> - complex (as indicated by Zack),
> - preprocessor changes (which ones are needed, which ones are done?),
> 
> What else?

IEEE arithmetic support, particularly the two #pragmas.

-- 
Geoffrey Keating <geoffk@cygnus.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-06 23:48   ` Martin v. Loewis
  1999-09-07  1:08     ` Geoff Keating
@ 1999-09-07  1:28     ` Andreas Jaeger
  1999-09-30 18:02       ` Andreas Jaeger
  1999-09-07  8:40     ` Andi Kleen
                       ` (2 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Andreas Jaeger @ 1999-09-07  1:28 UTC (permalink / raw)
  To: Martin v. Loewis; +Cc: gavin, scottrobertladd, gcc, scott

>>>>> Martin v Loewis writes:

>> As Zack said, most of the C9X work is in the library, but there 
>> is some compiler work needed.  This work is on my list of things to
>> do, but so is alot of other stuff :-).  

 > Could we come up with a list, just so that people know what needs to
 > be done? Currently, I see

 > - complex (as indicated by Zack),
 > - preprocessor changes (which ones are needed, which ones are done?),

 > What else?

AFAIK some printf specifiers are new in C9X and are not supported by
gcc.  glibc already supports the specifiers but every usage leads to
warnings by gcc.  If you need further details, ask me.  I've send this
once as a bug report.

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-06 23:48   ` Martin v. Loewis
  1999-09-07  1:08     ` Geoff Keating
  1999-09-07  1:28     ` Andreas Jaeger
@ 1999-09-07  8:40     ` Andi Kleen
  1999-09-30 18:02       ` Andi Kleen
  1999-09-07  9:15     ` Gerald Pfeifer
  1999-09-30 18:02     ` Martin v. Loewis
  4 siblings, 1 reply; 18+ messages in thread
From: Andi Kleen @ 1999-09-07  8:40 UTC (permalink / raw)
  To: Martin v. Loewis; +Cc: gcc

martin@mira.isdn.cs.tu-berlin.de (Martin v. Loewis) writes:

> > As Zack said, most of the C9X work is in the library, but there 
> > is some compiler work needed.  This work is on my list of things to
> > do, but so is alot of other stuff :-).  
> 
> Could we come up with a list, just so that people know what needs to
> be done? Currently, I see
> 
> - complex (as indicated by Zack),
> - preprocessor changes (which ones are needed, which ones are done?),
> 
> What else?

Support for declarations not only at the beginning of blocks and
in for loops:

f()
{
        int a;
        a = 1;
        int b;
        b = 2;
        for (int c = 3; c < 10; c++) { /* c is only in scope in the loop */
                ...
        } 
}

I actually once tried to hack that into the gcc bison parser, but I'm
afraid it'll need more work to guarantee at least the same level of 
syntax error recovery as the current C grammer has.

What is worse is that C9x "legalized" some gcc extensions, but changed
their semantics slightly. It requires a good migration strategy, and
will cause problems for system headers that use gcc extensions (like
glibc and Linux).

C9x inline implies static

C9x has a similar facility to GCC variable length local arrays. I believe
there are some subtle differences to the similar gcc extension too.

C9x declaration designators are different from gcc ([ x ] = val instead 
of [ x ] val ) 

Other easy changes:

- Support for _Pragma() 
- Support for universal character names
- Disable some -pedantic warnings for gcc extensions that are legal 
now (e.g. the [0] hack for the last structure element, comma at the
end of enum etc.) 

The draft I have also says that they changed the integer constant type
and integer promotion rules and the structure type compatibility rules.
I haven't checked what changes are exactly required for that.

-Andi

-- 
This is like TV. I don't like TV.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-06 23:48   ` Martin v. Loewis
                       ` (2 preceding siblings ...)
  1999-09-07  8:40     ` Andi Kleen
@ 1999-09-07  9:15     ` Gerald Pfeifer
  1999-09-07 15:24       ` Martin v. Loewis
  1999-09-30 18:02       ` Gerald Pfeifer
  1999-09-30 18:02     ` Martin v. Loewis
  4 siblings, 2 replies; 18+ messages in thread
From: Gerald Pfeifer @ 1999-09-07  9:15 UTC (permalink / raw)
  To: Martin v. Loewis; +Cc: gavin, scottrobertladd, gcc, scott

On Tue, 7 Sep 1999, Martin v. Loewis wrote:
> > As Zack said, most of the C9X work is in the library, but there 
>> is some compiler work needed.  This work is on my list of things to
>> do, but so is alot of other stuff :-).  
> Could we come up with a list, just so that people know what needs to
> be done? Currently, I see [...]

Martin, how about adding that list (together with the replies you got)
as a new item to our projects.html page?

IMO that would be a very useful thing[TM].

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-07  9:15     ` Gerald Pfeifer
@ 1999-09-07 15:24       ` Martin v. Loewis
  1999-09-30 18:02         ` Martin v. Loewis
  1999-09-30 18:02       ` Gerald Pfeifer
  1 sibling, 1 reply; 18+ messages in thread
From: Martin v. Loewis @ 1999-09-07 15:24 UTC (permalink / raw)
  To: pfeifer; +Cc: gavin, scottrobertladd, gcc, scott

> Martin, how about adding that list (together with the replies you got)
> as a new item to our projects.html page?

Done. I've added a few headings to projects.html, and also created
a separate table (c9xstatus.html) which lists the features as they
are listed in the draft.

Please review; comments (in particular on features with "unknown"
status) are appreciated.

Regards,
Martin

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-06 23:48   ` Martin v. Loewis
                       ` (3 preceding siblings ...)
  1999-09-07  9:15     ` Gerald Pfeifer
@ 1999-09-30 18:02     ` Martin v. Loewis
  4 siblings, 0 replies; 18+ messages in thread
From: Martin v. Loewis @ 1999-09-30 18:02 UTC (permalink / raw)
  To: gavin; +Cc: scottrobertladd, gcc, scott

> As Zack said, most of the C9X work is in the library, but there 
> is some compiler work needed.  This work is on my list of things to
> do, but so is alot of other stuff :-).  

Could we come up with a list, just so that people know what needs to
be done? Currently, I see

- complex (as indicated by Zack),
- preprocessor changes (which ones are needed, which ones are done?),

What else?

Martin

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-03 10:43 ` Zack Weinberg
@ 1999-09-30 18:02   ` Zack Weinberg
  0 siblings, 0 replies; 18+ messages in thread
From: Zack Weinberg @ 1999-09-30 18:02 UTC (permalink / raw)
  To: Scott Ladd; +Cc: gcc, scott

Scott Ladd wrote:
> The current release of gcc -- 2.95.1 -- includes very limited support
> for C9X.
> 
> Is anyone working on implementing C9X, especially the numeric parts
> (complex, inttypes, etc.)?

This is largely a library issue, and gcc does not provide the standard
library.  GNU libc 2.1 does include most of the new C9x features, but
it may not work on your platform.

You could help improve the intrinsic support for complex arithmetic,
which is part of gcc and which could use some work.

zw

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-07  1:08     ` Geoff Keating
@ 1999-09-30 18:02       ` Geoff Keating
  0 siblings, 0 replies; 18+ messages in thread
From: Geoff Keating @ 1999-09-30 18:02 UTC (permalink / raw)
  To: egcs

"Martin v. Loewis" <martin@mira.isdn.cs.tu-berlin.de> writes:

> > As Zack said, most of the C9X work is in the library, but there 
> > is some compiler work needed.  This work is on my list of things to
> > do, but so is alot of other stuff :-).  
> 
> Could we come up with a list, just so that people know what needs to
> be done? Currently, I see
> 
> - complex (as indicated by Zack),
> - preprocessor changes (which ones are needed, which ones are done?),
> 
> What else?

IEEE arithmetic support, particularly the two #pragmas.

-- 
Geoffrey Keating <geoffk@cygnus.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-07  1:28     ` Andreas Jaeger
@ 1999-09-30 18:02       ` Andreas Jaeger
  0 siblings, 0 replies; 18+ messages in thread
From: Andreas Jaeger @ 1999-09-30 18:02 UTC (permalink / raw)
  To: Martin v. Loewis; +Cc: gavin, scottrobertladd, gcc, scott

>>>>> Martin v Loewis writes:

>> As Zack said, most of the C9X work is in the library, but there 
>> is some compiler work needed.  This work is on my list of things to
>> do, but so is alot of other stuff :-).  

 > Could we come up with a list, just so that people know what needs to
 > be done? Currently, I see

 > - complex (as indicated by Zack),
 > - preprocessor changes (which ones are needed, which ones are done?),

 > What else?

AFAIK some printf specifiers are new in C9X and are not supported by
gcc.  glibc already supports the specifiers but every usage leads to
warnings by gcc.  If you need further details, ask me.  I've send this
once as a bug report.

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-07 15:24       ` Martin v. Loewis
@ 1999-09-30 18:02         ` Martin v. Loewis
  0 siblings, 0 replies; 18+ messages in thread
From: Martin v. Loewis @ 1999-09-30 18:02 UTC (permalink / raw)
  To: pfeifer; +Cc: gavin, scottrobertladd, gcc, scott

> Martin, how about adding that list (together with the replies you got)
> as a new item to our projects.html page?

Done. I've added a few headings to projects.html, and also created
a separate table (c9xstatus.html) which lists the features as they
are listed in the draft.

Please review; comments (in particular on features with "unknown"
status) are appreciated.

Regards,
Martin

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-07  9:15     ` Gerald Pfeifer
  1999-09-07 15:24       ` Martin v. Loewis
@ 1999-09-30 18:02       ` Gerald Pfeifer
  1 sibling, 0 replies; 18+ messages in thread
From: Gerald Pfeifer @ 1999-09-30 18:02 UTC (permalink / raw)
  To: Martin v. Loewis; +Cc: gavin, scottrobertladd, gcc, scott

On Tue, 7 Sep 1999, Martin v. Loewis wrote:
> > As Zack said, most of the C9X work is in the library, but there 
>> is some compiler work needed.  This work is on my list of things to
>> do, but so is alot of other stuff :-).  
> Could we come up with a list, just so that people know what needs to
> be done? Currently, I see [...]

Martin, how about adding that list (together with the replies you got)
as a new item to our projects.html page?

IMO that would be a very useful thing[TM].

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Support for C9X in gcc?
  1999-09-03 10:37 Support for C9X in gcc? Scott Ladd
  1999-09-03 10:43 ` Zack Weinberg
  1999-09-03 11:44 ` Gavin Romig-Koch
@ 1999-09-30 18:02 ` Scott Ladd
  2 siblings, 0 replies; 18+ messages in thread
From: Scott Ladd @ 1999-09-30 18:02 UTC (permalink / raw)
  To: gcc; +Cc: scott

The current release of gcc -- 2.95.1 -- includes very limited support
for C9X.

Is anyone working on implementing C9X, especially the numeric parts
(complex, inttypes, etc.)?

If not, I'm thinking of volunteering.

(Now we know I'm nuts...)
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Support for C9X in gcc?
  1999-09-07  8:40     ` Andi Kleen
@ 1999-09-30 18:02       ` Andi Kleen
  0 siblings, 0 replies; 18+ messages in thread
From: Andi Kleen @ 1999-09-30 18:02 UTC (permalink / raw)
  To: Martin v. Loewis; +Cc: gcc

martin@mira.isdn.cs.tu-berlin.de (Martin v. Loewis) writes:

> > As Zack said, most of the C9X work is in the library, but there 
> > is some compiler work needed.  This work is on my list of things to
> > do, but so is alot of other stuff :-).  
> 
> Could we come up with a list, just so that people know what needs to
> be done? Currently, I see
> 
> - complex (as indicated by Zack),
> - preprocessor changes (which ones are needed, which ones are done?),
> 
> What else?

Support for declarations not only at the beginning of blocks and
in for loops:

f()
{
        int a;
        a = 1;
        int b;
        b = 2;
        for (int c = 3; c < 10; c++) { /* c is only in scope in the loop */
                ...
        } 
}

I actually once tried to hack that into the gcc bison parser, but I'm
afraid it'll need more work to guarantee at least the same level of 
syntax error recovery as the current C grammer has.

What is worse is that C9x "legalized" some gcc extensions, but changed
their semantics slightly. It requires a good migration strategy, and
will cause problems for system headers that use gcc extensions (like
glibc and Linux).

C9x inline implies static

C9x has a similar facility to GCC variable length local arrays. I believe
there are some subtle differences to the similar gcc extension too.

C9x declaration designators are different from gcc ([ x ] = val instead 
of [ x ] val ) 

Other easy changes:

- Support for _Pragma() 
- Support for universal character names
- Disable some -pedantic warnings for gcc extensions that are legal 
now (e.g. the [0] hack for the last structure element, comma at the
end of enum etc.) 

The draft I have also says that they changed the integer constant type
and integer promotion rules and the structure type compatibility rules.
I haven't checked what changes are exactly required for that.

-Andi

-- 
This is like TV. I don't like TV.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Support for C9X in gcc?
  1999-09-03 11:44 ` Gavin Romig-Koch
  1999-09-06 23:48   ` Martin v. Loewis
@ 1999-09-30 18:02   ` Gavin Romig-Koch
  1 sibling, 0 replies; 18+ messages in thread
From: Gavin Romig-Koch @ 1999-09-30 18:02 UTC (permalink / raw)
  To: Scott Ladd; +Cc: gcc, scott

Scott Ladd writes:
 > The current release of gcc -- 2.95.1 -- includes very limited support
 > for C9X.
 > 
 > Is anyone working on implementing C9X, especially the numeric parts
 > (complex, inttypes, etc.)?
 > 
 > If not, I'm thinking of volunteering.

Great.

As Zack said, most of the C9X work is in the library, but there 
is some compiler work needed.  This work is on my list of things to
do, but so is alot of other stuff :-).  

                                           -gavin...

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~1999-09-30 18:02 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-03 10:37 Support for C9X in gcc? Scott Ladd
1999-09-03 10:43 ` Zack Weinberg
1999-09-30 18:02   ` Zack Weinberg
1999-09-03 11:44 ` Gavin Romig-Koch
1999-09-06 23:48   ` Martin v. Loewis
1999-09-07  1:08     ` Geoff Keating
1999-09-30 18:02       ` Geoff Keating
1999-09-07  1:28     ` Andreas Jaeger
1999-09-30 18:02       ` Andreas Jaeger
1999-09-07  8:40     ` Andi Kleen
1999-09-30 18:02       ` Andi Kleen
1999-09-07  9:15     ` Gerald Pfeifer
1999-09-07 15:24       ` Martin v. Loewis
1999-09-30 18:02         ` Martin v. Loewis
1999-09-30 18:02       ` Gerald Pfeifer
1999-09-30 18:02     ` Martin v. Loewis
1999-09-30 18:02   ` Gavin Romig-Koch
1999-09-30 18:02 ` Scott Ladd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).