## Bug of the day

While I was bringing minor changes to an existing script, I got this strange message:

In file included from C:\Program Files\arduino-1.0.5\libraries\GSM/GSM3CircularBuffer.h:39,
from C:\Program Files\arduino-1.0.5\libraries\GSM/GSM.h:40,
from HL2_tag_controller_proto2_v5.ino:16:
c:\program files\arduino-1.0.5\hardware\tools\avr\bin\../lib/gcc/avr/4.3.2/include/stddef.h:152: error: two or more data types in declaration of ‘ptrdiff_t’

The script which is 1000 lines long and it includes an RTC library (and its related SPI library), a temperature sensor library, and EEPROM library, a CMD interpreter library and the standard GSM library. The obvious diagnostic strategy was to look at the GSM libraries… . However, no bugs were reported on the Internet, while this type of message was known as a gcc rev. 4 defect…

After a couple of hours trying to understand, I applied the good ol’ brute force method which consists in commenting blocks and blocks of code until the problem would disappear ( The so called minimal system testing). Up to the first line of script which was the inclusion of the temperature sensor library! Once this line was commented the code could be compiled! It took me approximately half a second to realize that the semi colon at the class declaration end was … missing.

/* no comment */