Description
This is Issue 1007 moved from a Google Code project.
Added by 2012-08-16T18:20:18.000Z by sebastia...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Defect, Priority-Medium
Original description
What steps will reproduce the problem?
- Sketch with two files, each importing (directly or indirectly) IPAddress.h
- avr-nm -n on the resulting elf (on Windows)
What is the expected output? What do you see instead?
Expect only a single instance of INADDR_NONE in .bss section, but multiple are allocated, consuming precious SRAM space (in my case of a bigger piece of software, seven instances).
Note also that IPAddress consumes six bytes, not four, due to the class pointer required for the virtual function.
This is on arduino-1.0.1 under Windows 7.
Please provide any additional information below.
Suggest to declare INADDR_NONE extern in IPAddress.h, and to define it in IPAddress.cpp.