SQLite Forum

Please avoid all use of the "LL" suffix for long-long integer literals
Login
I recently upgraded SQLite3 from version 3.16.2 to 3.35.3.

Somewhere in those changes were introduced compiler errors for my compiler (MS Visual Studio 6.0) on four lines, namely the ones with long-long constants with the LL suffix.

In the (current) amalgamation (3.35.4) these lines are, in sqlite3.c:

```
32373:    if( v>4294967296LL ){ *pI = 0; return 0; }

77185:           && i >= -2251799813685248LL && i < 2251799813685248LL);

88849:       if( pIn1->u.i<=140737488355327LL && pIn1->u.i>=-140737488355328LL ){

89051:       }else if( uu<=140737488355327LL ){
```

I request that the suffix LL be removed from these four lines (and neighouring ones calling testcase - however that is not impacting me personally), in order to avoid the compiler error: C2059 'bad suffix on number'

According to the C standard, decimal integer constants without a suffix are automatically promoted to int, long int or long long int as required to hold the value in the constant. Thus the explicit use of LL is not required.

I note that there was previously a ticket along similar lines:

<https://github.com/sqlite/sqlite/commit/5c905d6e9188c62a216cd94c90894504de6b0ec5> "Avoid all use of the "LL" suffix for long-long integer literals.".

This is referenced here:

<https://www2.sqlite.org/src/timeline?c=7ef36935424013a1&y=a>

Doing this would not impact more modern compilers, and would avoid compiler errors on older compilers.

Thanks in advance.