URL:
<http://savannah.nongnu.org/bugs/?38572>
Summary: Problem with variable "SS" in hwspi
Project: Simulavr: an AVR simulator
Submitted by: skappel
Submitted on: Fri 22 Mar 2013 03:42:50 PM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Email: [email protected]
Open/Closed: Open
Discussion Lock: Any
Component Version: simulavr
_______________________________________________________
Details:
In src/hwspi.h and src/hwspi.cpp the variable named SS causes an error due to
SS being already defined as "SS [-Wcpp]":
gmake[3]: Entering directory
`/export/scratch/builds/ada/native/simulavr-1.0.0-obj/src'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.
-I../../simulavr-1.0.0/src -I/scratch/builds/ada/run/include -g -O2 -Icmd
-Iui -Ihwtimer -MT at4433.lo -MD -MP -MF .deps/at4433.Tpo -c -o at4433.lo
../../simulavr-1.0.0/src/at4433.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../simulavr-1.0.0/src
-I/scratch/builds/ada/run/include -g -O2 -Icmd -Iui -Ihwtimer -MT at4433.lo
-MD -MP -MF .deps/at4433.Tpo -c ../../simulavr-1.0.0/src/at4433.cpp -fPIC
-DPIC -o .libs/at4433.o
In file included from ../../simulavr-1.0.0/src/at4433.h:35:0,
from ../../simulavr-1.0.0/src/at4433.cpp:26:
../../simulavr-1.0.0/src/hwspi.h:57:19: error: expected unqualified-id
before numeric constant
gmake[3]: *** [at4433.lo] Error 1
When I insert the statement "#warning Symbol SS" right before line 57 of
hwspi.h I get:
In file included from ../../simulavr-1.0.0/src/at4433.h:35:0,
from ../../simulavr-1.0.0/src/at4433.cpp:26:
../../simulavr-1.0.0/src/hwspi.h:57:2: warning: #warning Symbol SS
[-Wcpp]
../../simulavr-1.0.0/src/hwspi.h:58:19: error: expected unqualified-id
before numeric constant
This is using gcc 4.7.2 with Ada enabled.
Renaming the variable eliminates the problem.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?38572>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
_______________________________________________
Simulavr-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/simulavr-devel