<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/diagnostics/int-literal.slang, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2025-09-05T23:03:32+00:00</updated>
<entry>
<title>Add warnings for overflows of integer types (#8281)</title>
<updated>2025-09-05T23:03:32+00:00</updated>
<author>
<name>jarcherNV</name>
<email>jarcher@nvidia.com</email>
</author>
<published>2025-09-05T23:03:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=5055de0bb1cf3f9aac63a60217f2dbde5533c557'/>
<id>urn:sha1:5055de0bb1cf3f9aac63a60217f2dbde5533c557</id>
<content type='text'>
The code int x4 = 0xFFFFFFFFFFFFFFFF previously did not produce a
warning due to the value being too large for the type. This patch now
checks for this and similar issues during parsing.</content>
</entry>
<entry>
<title>Conform non-suffixed integer literals (#5717)</title>
<updated>2024-12-03T21:40:09+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2024-12-03T21:40:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=98cab6fa86c9e594fb69571cf1d864294b0aae45'/>
<id>urn:sha1:98cab6fa86c9e594fb69571cf1d864294b0aae45</id>
<content type='text'>
* Make non-suffixed integer literal type resolution conform to C

* Update integer literal tests

* Clean up integer literal implementation a bit

* Update docs on integer literals

* Clean up docs update

* Clean up docs update

* Add comment on INT64_MIN edge case

* Fixed failing test, fixed formatting and cleaned up code

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Literal handling improvements (#1202)</title>
<updated>2020-02-06T19:31:09+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2020-02-06T19:31:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d3331fba6eaab44646010b556106da38925d43e0'/>
<id>urn:sha1:d3331fba6eaab44646010b556106da38925d43e0</id>
<content type='text'>
* WIP: 64 literal diagnostic and truncation.

* Improve how integer truncation is handled/supported.
Added literal-int64.slang test.
Set a suffix on all literals.
Fixed problem on C++ based targets where l suffix was not the same as int() cast. So on C++ derived emitters, int() is used instead of l suffix to have same behavior across targets.

* Add literal diagnostic testing.

* Allow lexer to lex - in front of literals.

* Fix lexing and converting int literal with -.

* Too large small values of floats become inf.
Handling writing inf types out on different targets.
Add function to deterimine if a float literals kind.

* Roll back the support of lexer lexing negative literals.

* Fixed tests broken because of diagnostics numbers.
Improved _isFinite

* Fix compilation on linux.

* Fix problem with abs on linux - use Math::Abs.

* Fix typo.

* * Improve warnings for float literals zeroed
* Improved 64 bit type documentation
* Handle half
* Improved comments
* Fixed tests broken
* Use capital letters for suffixes.

* Make default behavior on outputting a int literal that is an 'int32_t' is cast (not suffix) to avoid platform inconsistencies.
Improve documentation for 64 bit types.
Make tests cover material in docs.

* Fixed tests.

* Rename FloatKind::Normal -&gt; Finite

* Fix half zero check.
</content>
</entry>
</feed>
