Blog

A bit of explanation regarding the quiz in the last post
Pascal Cuoq on 20 January 2012

There are only positive constants in C, as per section 6.4.4 in the C99 standard: integer-constant: decimal-constant integer-suffixopt octal-constant integer-suffixopt hexadecimal-constant integer-suffixopt decimal-constant: nonzero-digit decimal-constant digit octal-constant: 0 octal-constant octal-digit hexadecimal-constant: hexadecimal-prefix hexadecimal-digit hexadecimal-constant hexadecimal-digit ... The minus sign is not part of the constant according to the grammar. The...

Read More

Constants quiz
Pascal Cuoq on 20 January 2012

What does the following program print? long long l; #include <stdio.h> int main() { l = -0x80000000; printf(\%lld" l); } $ gcc t.c && ./a.out And this one? (beware trick question) long long l; #include <stdio.h> int main() { l = -2147483648; printf("%lld" l); } $ gcc t.c && ./a.out...

Read More

Critics
Pascal Cuoq on 16 January 2012

This blog is not intended to be about computer gaming, even partially. In fact, the post I am about to link to comes from a feed I was subscribed to by accident when I changed news readers. I haven't bothered to fix this yet. The post starts with this quote:...

Read More

Csmith testing
Pascal Cuoq on 16 January 2012

This page contains various remarks that did not make it into our article about Csmith-testing Frama-C. It is an annex of sorts except that it is written in a less formal style that will be familiar to readers of the Frama-C blog. It is not intended to make sense by...

Read More

Csmith testing again
Pascal Cuoq on 16 January 2012

My presentation Friday at the U3CAT meeting was on the topic of Frama-C Csmith testing. Several posts in this blog already describe facets of this work (it has its own tag). Yet another angle can be found in this short article draft. Said draft by the way will soon need...

Read More