1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 18:11:04 +09:00
Satori/docs/coding-guidelines
Aleksey Kliger (λgeek) 4110bcea5b
Bump mono to -std=gnu11 (#91421)
Change the mono build to require C11 (with gnu extensions on gcc/clang platforms).
* Change `g_static_assert` to be `_Static_assert` or `static_assert` as apropriate.
* Change `_DN_STATIC_ASSERT` to be `static_assert`
* Add static asserts in `jiterp.c` when it casts between `T*` and `atomic_T*`
* Add C11 guidance to the mono coding guide doc

Contributes to #90404 

---

* Bump mono to -std=gnu99; use static_assert

* don't fall back to runtime checks for g_static_assert

* fix static assert that wasn't a constant expression

* use static_assert in shared containers

* bump C standard in offsets-tool.py

* use _Static_assert before C23

   Dont' include assert.h in glib.h because some of our older 3P code includes assert.h on its own and there are conflicts

* use CMAKE_C_STANDARD and related properties

* jiterp: static_assert that atomic ops are (less likely) to go wrong

   Not every C implementation guarantees that atomic operations on arbitrary types are lock free.  So for example, casting between atomic_ushort* and uint16_t* might not actually be ok to do.  We can't assert that they're inter-castable, but at least assert that they're the same size and that atomic_ushort is always lock-free. There might still be restrictions (for example atomic_ushort might have to be aligned differently) but this should at least catch obvious data corruption.

* Add C11 guidance to the Mono coding guide

* jiterp: long is 32-bits on wasm; use llong
2023-09-01 18:04:35 -04:00
..
api-guidelines link to the latest version of Framework Design Guidelines (#86216) 2023-05-15 09:58:01 -04:00
adding-api-guidelines.md Replace net7 with net8 in dogfooding and workflow docs (#75453) 2022-09-12 20:40:44 -07:00
breaking-change-definitions.md Fix trailing whitespaces (#40891) 2020-08-19 17:29:01 -07:00
breaking-change-rules.md Update breaking-change-rules.md (#66978) 2022-04-14 17:19:47 -07:00
breaking-changes.md Fix trailing whitespaces (#40891) 2020-08-19 17:29:01 -07:00
clr-code-guide.md Replace remaining instances of COMPlus with DOTNET (#82985) 2023-03-05 08:40:20 -08:00
clr-jit-coding-conventions.md Replace remaining instances of COMPlus with DOTNET (#82985) 2023-03-05 08:40:20 -08:00
code-formatting-tools.md Move clang-format download into dotnet/runtime and add docs for setting up auto-formatting in the repository (#59374) 2021-09-23 14:34:00 -07:00
coding-style.md Update coding-style.md (#67801) 2022-04-09 06:37:05 -07:00
cross-platform-guidelines.md corefx => runtime (#2068) 2020-01-24 09:30:18 -08:00
cross-platform-performance-and-eventing.md .NET Core to .NET branding changes (#33694) 2020-03-28 07:00:19 -07:00
EventLogging.md Fix typos (#69011) 2022-05-07 11:55:53 -07:00
framework-design-guidelines-digest.md link to the latest version of Framework Design Guidelines (#86216) 2023-05-15 09:58:01 -04:00
interop-guidelines.md add link to interop guidelines (#83987) 2023-03-27 12:40:19 -06:00
libraries-packaging.md Update Package readme guidelines with new template (#90842) 2023-08-21 12:44:18 +02:00
mono-code-guide.md Bump mono to -std=gnu11 (#91421) 2023-09-01 18:04:35 -04:00
performance-guidelines.md Fix broken MSDN blogs links (#32273) 2020-02-14 08:34:15 -08:00
project-guidelines.md Use analyzers from targeting pack for NetCoreAppCurrent (#87726) 2023-06-19 23:27:38 +02:00
updating-ref-source.md Leverage the shipping, roslyn based ApiCompat in dotnet/runtime (#73263) 2022-10-16 15:15:28 +02:00
vectorization-guidelines.md Introduction to vectorization with Vector128 and Vector256 (#84115) 2023-06-29 11:00:07 +02:00
vs-cpp-formatting.png Move clang-format download into dotnet/runtime and add docs for setting up auto-formatting in the repository (#59374) 2021-09-23 14:34:00 -07:00
vs-csharp-formatting.png Move clang-format download into dotnet/runtime and add docs for setting up auto-formatting in the repository (#59374) 2021-09-23 14:34:00 -07:00