Hi!<br><br>I have a header file "stdio.h" that has many lines in the format<br><br>__externC argument fn(params) __THROW;<br><br>__externC expands to extern  "C" (as expected) and __THROW to throw() but on some lines i get the message:<br>

<br>ecos/install/include/cyg/libc/stdio/stdio.h:155: error: invalid declaration near token `"C"'<br><br>This is weird since for some lines there are no problem and on other it complains...<br><br>Here is what i mean:<br>

<br>Excerpt from stdio.h<br><br>145 __externC FILE *<br>146 fopen( const char * /* filename */, const char * /* mode */ ) __THROW;<br>147 <br>148 __externC FILE *<br>149 freopen( const char * /* filename */, const char * /* mode */,<br>

150          FILE * /* stream */ ) __THROW;<br>151 <br>152 __externC void<br>153 setbuf( FILE * /* stream */, char * /* buffer */ ) __THROW;<br>154 <br>155 __externC int<br>156 setvbuf( FILE * /* stream */, char * /* buffer */, int /* mode */,<br>

157          size_t /* size */ ) __THROW;<br>158 <br>159 //========================================================================<br>160 <br>161 // ISO C89 7.9.6 Formatted input/output functions<br>162 <br>163 __externC int<br>

164 fprintf( FILE * /* stream */, const char * /* format */, ... ) __THROW<br>165     CYGBLD_ATTRIB_PRINTF_FORMAT(2, 3);<br>166 <br>167 __externC int<br>168 fscanf( FILE * /* stream */, const char * /* format */, ... ) __THROW<br>

169     CYGBLD_ATTRIB_SCANF_FORMAT(2, 3);<br>170 <br>171 __externC int<br>172 printf( const char * /* format */, ... ) __THROW<br>173     CYGBLD_ATTRIB_PRINTF_FORMAT(1, 2);<br>174 <br>175 __externC int<br>176 scanf( const char * /* format */, ... ) __THROW<br>

177     CYGBLD_ATTRIB_SCANF_FORMAT(1, 2);<br>178 <br>179 __externC int<br>180 sprintf( char * /* str */, const char * /* format */, ... ) __THROW<br>181     CYGBLD_ATTRIB_PRINTF_FORMAT(2, 3);<br>182 <br>183 __externC int<br>

184 sscanf( const char * /* str */, const char * /* format */, ... ) __THROW<br>185     CYGBLD_ATTRIB_SCANF_FORMAT(2, 3);<br>186 <br>187 __externC int<br>188 vfprintf( FILE * /* stream */, const char * /* format */,<br>189           va_list /* args */ ) __THROW CYGBLD_ATTRIB_PRINTF_FORMAT(2, 0);<br>

190 <br><br>and the error message from ac++:<br><br>ag++ -v9 --c_compiler i386-elf-g++   -o build/main.o main.cpp -c -I./ecos/install/include -I. -I/opt/sigubufo/branch/tools/gnutools/i386-elf/lib/gcc-lib/i386-elf/3.2.1/include/ -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -D_KERNEL <br>

* <br>* <br>* AG++ Configuration:<br>*   Aspect C++ weaver:  ac++<br>*   C++ compiler:       i386-elf-g++<br>*   Files:               main.cpp<br>*   Options (G++):       -v -o "build/main.o"  -I "."  -c -I "./ecos/install/include"  -I "."  -I "/opt/sigubufo/branch/tools/gnutools/i386-elf/lib/gcc-lib/i386-elf/3.2.1/include/"  -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -D "_KERNEL" <br>

*   Options (AC++):      -v9 -I "./ecos/install/include"  -I "."  -I "/opt/sigubufo/branch/tools/gnutools/i386-elf/lib/gcc-lib/i386-elf/3.2.1/include/"  -D "_KERNEL"  -p.<br>*   Options (total):     -v9 -v -o "build/main.o"  main.cpp -I "."  -c -I "./ecos/install/include"  -I "."  -I "/opt/sigubufo/branch/tools/gnutools/i386-elf/lib/gcc-lib/i386-elf/3.2.1/include/"  -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -D "_KERNEL"  -p.<br>

*   PumaConfig: 1 Weave: 1 Compile: 1 Link: 0<br>* <br>* <br>* Generating Puma configuration file<br>  - Parsing output of g++ compiler<br>  - Executing: "i386-elf-g++"  -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -E -dM -v -x c++ "/dev/null" 2>/tmp/agxx_stderrC5cftH 1>/tmp/agxx_stdoutEn4tHb<br>

  - Exit: Success<br>  - removing temporary file: /tmp/agxx_stdoutEn4tHb<br>  - removing temporary file: /tmp/agxx_stderrC5cftH<br>  - Writing puma configuration file '/tmp/agxx_pcfg2cXLVF'<br>* Weaving<br>  - Executing: "ac++" --config "/tmp/agxx_pcfg2cXLVF"  -v9 -I "./ecos/install/include"  -I "."  -I "/opt/sigubufo/branch/tools/gnutools/i386-elf/lib/gcc-lib/i386-elf/3.2.1/include/"  -D "_KERNEL"  -p. -c "main.cpp" -o "/tmp/main.cpp_agxx_2Dhk1d"<br>

* Running ac++ 1.0<br>* Handling Translation Unit `main.cpp'.<br>  - Path "main.cpp"<br>  - Inserting namespace AC<br>  - Parsing ...<br>ecos/install/include/cyg/libc/stdio/stdio.h:155: error: invalid declaration near token `"C"'<br>

ecos/install/include/cyg/libc/stdio/stdio.h:187: error: invalid declaration near token `"C"'<br>ecos/install/include/cyg/libc/stdio/stdio.h:191: error: invalid declaration near token `"C"'<br>
ecos/install/include/cyg/libc/stdio/stdio.h:195: error: invalid declaration near token `"C"'<br>
ecos/install/include/cyg/libc/stdio/stdio.h:247: error: invalid declaration near token `"C"'<br><br>as one can see he does only complain for some of the lines (until line 155 he is happy about all those __externC), not all...<br>

<br>Is there a way i can further narrow down this problem?<br><br>Best regards,<br>Guilherme<br>