Drake,

On Fri, Nov 29, 2013 at 7:04 PM, Drake Wilson <dr...@dasyatidae.net> wrote:
> Quoth Igor Korot <ikoro...@gmail.com>, on 2013-11-29 18:49:05 -0800:
>> Trying to change the return type to long does not solve the warning.
>>
>> Which value should this function return?
>
> As you can see from http://sqlite.org/c3ref/last_insert_rowid.html, it
> returns sqlite3_int64, a signed 64-bit integer type.  The C99 name and
> I think the C++11 name for this is int64_t, which is probably what
> you want, but I vaguely recall the Microsoft compiler requires jumping
> through some kind of hoop to get it.  You could just use sqlite3_int64
> directly if you don't mind taking the header dependency.

Well, than I don't want the extra dependancy.
I have a nice application with dependancies set up correctly as it is
compiled on Windows.
And I wouldn't even know about it if it's not about Mac compilation. ;-)

My biggest problem is: why MSVC compiled this code just fine?

Also I am compiling 32-bit app on both platforms.

>
> The truncation is actually a potential error: e.g., a row ID of 2^32
> would be returned as 0 instead on a system with 32-bit int.  It's the
> sort of thing you might not see in production for a while until it
> breaks everything suddenly a ways down the line.

Yes, thats why I am trying to solve it.

Thank you.

>
>    ---> Drake Wilson
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to