ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:116044] [Ruby master Misc#20156] C99 updates
@ 2024-01-05 23:11 kddnewton (Kevin Newton) via ruby-core
  2024-01-06 10:54 ` [ruby-core:116053] " nobu (Nobuyoshi Nakada) via ruby-core
  2024-01-08 14:59 ` [ruby-core:116070] " kddnewton (Kevin Newton) via ruby-core
  0 siblings, 2 replies; 3+ messages in thread
From: kddnewton (Kevin Newton) via ruby-core @ 2024-01-05 23:11 UTC (permalink / raw
  To: ruby-core; +Cc: kddnewton (Kevin Newton)

Issue #20156 has been reported by kddnewton (Kevin Newton).

----------------------------------------
Misc #20156: C99 updates
https://bugs.ruby-lang.org/issues/20156

* Author: kddnewton (Kevin Newton)
* Status: Open
* Priority: Normal
----------------------------------------
Now that we require Visual Studio 2015 and Oracle Developer Studio 12.5, we can do a couple of things to clean up:

* We should be able to remove our custom `stdbool.h` (added in VS2015 and Oracle SS 12.3)
* Remove our usage of `__restrict` for Windows (added in VS2015)
* Remove our custom `va_copy` (added in VS2015)

Just notating, a couple of things that we _can_ use now:

* snprintf
* size_t printf format specifier (%z)

I'm happy to do this work, but I wanted to open this ticket in case there is something besides Visual Studio or Oracle Solaris Studio that I would have missed for one of our compilation targets. Are there any other targets that do not fully implement C99?



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

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

* [ruby-core:116053] [Ruby master Misc#20156] C99 updates
  2024-01-05 23:11 [ruby-core:116044] [Ruby master Misc#20156] C99 updates kddnewton (Kevin Newton) via ruby-core
@ 2024-01-06 10:54 ` nobu (Nobuyoshi Nakada) via ruby-core
  2024-01-08 14:59 ` [ruby-core:116070] " kddnewton (Kevin Newton) via ruby-core
  1 sibling, 0 replies; 3+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2024-01-06 10:54 UTC (permalink / raw
  To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)

Issue #20156 has been updated by nobu (Nobuyoshi Nakada).




kddnewton (Kevin Newton) wrote:
> Now that we require Visual Studio 2015 and Oracle Developer Studio 12.5, we can do a couple of things to clean up:
> 
> * We should be able to remove our custom `stdbool.h` (added in VS2015 and Oracle SS 12.3)

b75828fdfadaff6c5e09e42be32dff1216ed8fb1 says:
> Fix compile error with Oracle Solaris Studio 12.4 on Solaris 10.

No problem with Oracle SS 12.5? 

> * Remove our usage of `__restrict` for Windows (added in VS2015)

`_MSC_VER` 1800 seems VS2013, so we might have been able to drop this condition already.

```C
!if $(MSC_VER) >= 1800
#define restrict __restrict
!else
#define restrict /* not supported */
!endif
```

> * Remove our custom `va_copy` (added in VS2015)

This is removed already?

> Just notating, a couple of things that we _can_ use now:
> 
> * snprintf

We use our custom `snprintf` not only for old platforms, but also to avoid locales.


----------------------------------------
Misc #20156: C99 updates
https://bugs.ruby-lang.org/issues/20156#change-106050

* Author: kddnewton (Kevin Newton)
* Status: Open
* Priority: Normal
----------------------------------------
Now that we require Visual Studio 2015 and Oracle Developer Studio 12.5, we can do a couple of things to clean up:

* We should be able to remove our custom `stdbool.h` (added in VS2015 and Oracle SS 12.3)
* Remove our usage of `__restrict` for Windows (added in VS2015)
* Remove our custom `va_copy` (added in VS2015)

Just notating, a couple of things that we _can_ use now:

* snprintf
* size_t printf format specifier (%z)

I'm happy to do this work, but I wanted to open this ticket in case there is something besides Visual Studio or Oracle Solaris Studio that I would have missed for one of our compilation targets. Are there any other targets that do not fully implement C99?



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

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

* [ruby-core:116070] [Ruby master Misc#20156] C99 updates
  2024-01-05 23:11 [ruby-core:116044] [Ruby master Misc#20156] C99 updates kddnewton (Kevin Newton) via ruby-core
  2024-01-06 10:54 ` [ruby-core:116053] " nobu (Nobuyoshi Nakada) via ruby-core
@ 2024-01-08 14:59 ` kddnewton (Kevin Newton) via ruby-core
  1 sibling, 0 replies; 3+ messages in thread
From: kddnewton (Kevin Newton) via ruby-core @ 2024-01-08 14:59 UTC (permalink / raw
  To: ruby-core; +Cc: kddnewton (Kevin Newton)

Issue #20156 has been updated by kddnewton (Kevin Newton).


I was going based on https://github.com/ruby/ruby/wiki/C99-Usage-Guidelines. Maybe this documentation needs to be updated.

> b75828fdfadaff6c5e09e42be32dff1216ed8fb1 says:

>> Fix compile error with Oracle Solaris Studio 12.4 on Solaris 10.

> No problem with Oracle SS 12.5?

The title of that commit is `Support C89 if possible`. @ngoto was that necessary for actual C99 compilers or only to support old out-of-date compilers?

> _MSC_VER 1800 seems VS2013, so we might have been able to drop this condition already.

Yes I think this is true.

> We use our custom snprintf not only for old platforms, but also to avoid locales.

I see, thanks for the clarification.

----------------------------------------
Misc #20156: C99 updates
https://bugs.ruby-lang.org/issues/20156#change-106068

* Author: kddnewton (Kevin Newton)
* Status: Open
* Priority: Normal
----------------------------------------
Now that we require Visual Studio 2015 and Oracle Developer Studio 12.5, we can do a couple of things to clean up:

* We should be able to remove our custom `stdbool.h` (added in VS2015 and Oracle SS 12.3)
* Remove our usage of `__restrict` for Windows (added in VS2015)
* Remove our custom `va_copy` (added in VS2015)

Just notating, a couple of things that we _can_ use now:

* snprintf
* size_t printf format specifier (%z)

I'm happy to do this work, but I wanted to open this ticket in case there is something besides Visual Studio or Oracle Solaris Studio that I would have missed for one of our compilation targets. Are there any other targets that do not fully implement C99?



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

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

end of thread, other threads:[~2024-01-08 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 23:11 [ruby-core:116044] [Ruby master Misc#20156] C99 updates kddnewton (Kevin Newton) via ruby-core
2024-01-06 10:54 ` [ruby-core:116053] " nobu (Nobuyoshi Nakada) via ruby-core
2024-01-08 14:59 ` [ruby-core:116070] " kddnewton (Kevin Newton) via ruby-core

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).