On Sat, Nov 5, 2011 at 11:02 AM, Kai Tietz <[email protected]> wrote:
> 2011/11/4 Vincent Torri <[email protected]>:
>> Hey,
>>
>> I have an error when defining
>>
>> #define always_inline __attribute__ ((always_inline))
>>
>>
>> with mingw-w64 (32 bits, gcc 4.7). Everything is below.
>>
>> any idea ?
>>
>> Thank you
>>
>> Vincent Torri
>>
>> code:
>>
>> #define PACKAGE_NAME "evas"
>> #define PACKAGE_TARNAME "evas"
>> #define PACKAGE_VERSION "1.0.999.64739"
>> #define PACKAGE_STRING "evas 1.0.999.64739"
>> #define PACKAGE_BUGREPORT "[email protected]"
>> #define PACKAGE_URL ""
>> #define PACKAGE "evas"
>> #define VERSION "1.0.999.64739"
>> #define STDC_HEADERS 1
>> #define HAVE_SYS_TYPES_H 1
>> #define HAVE_SYS_STAT_H 1
>> #define HAVE_STDLIB_H 1
>> #define HAVE_STRING_H 1
>> #define HAVE_MEMORY_H 1
>> #define HAVE_STRINGS_H 1
>> #define HAVE_INTTYPES_H 1
>> #define HAVE_STDINT_H 1
>> #define HAVE_UNISTD_H 1
>> #define __EXTENSIONS__ 1
>> #define _ALL_SOURCE 1
>> #define _GNU_SOURCE 1
>> #define _POSIX_PTHREAD_SEMANTICS 1
>> #define _TANDEM_SOURCE 1
>> #define HAVE_DLFCN_H 1
>> #define LT_OBJDIR ".libs/"
>> #define VMAJ 1
>> #define VMIN 0
>> #define VMIC 999
>> #define VREV 64739
>> #define MODULE_ARCH "mingw32-i686-1.0.999"
>> #define HAVE_EVIL 1
>> #define SIZEOF_EINA_UNICODE 4
>> #define HAVE_FONTCONFIG 1
>> #define HAVE_LINEBREAK 1
>> #define STDC_HEADERS 1
>> #define HAVE_UNISTD_H 1
>> #define HAVE_STDINT_H 1
>> #define HAVE_SYS_PARAM_H 1
>> #define __UNUSED__ __attribute__ ((unused))
>> #define HAVE_GCC_ATTRIBUTE_VECTOR 1
>> #define always_inline __attribute__ ((always_inline))
>> #define EFL_EVAS_BUILD 1
>> #define HAVE_ALLOCA 1
>> /* end confdefs.h.  */
>> #include <stdio.h>
>> #ifdef HAVE_SYS_TYPES_H
>> # include <sys/types.h>
>> #endif
>> #ifdef HAVE_SYS_STAT_H
>> # include <sys/stat.h>
>> #endif
>> #ifdef STDC_HEADERS
>> # include <stdlib.h>
>> # include <stddef.h>
>> #else
>> # ifdef HAVE_STDLIB_H
>> #  include <stdlib.h>
>> # endif
>> #endif
>> #ifdef HAVE_STRING_H
>> # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
>> #  include <memory.h>
>> # endif
>> # include <string.h>
>> #endif
>> #ifdef HAVE_STRINGS_H
>> # include <strings.h>
>> #endif
>> #ifdef HAVE_INTTYPES_H
>> # include <inttypes.h>
>> #endif
>> #ifdef HAVE_STDINT_H
>> # include <stdint.h>
>> #endif
>> #ifdef HAVE_UNISTD_H
>> # include <unistd.h>
>> #endif
>> #include <fnmatch.h>
>>
>>
>> -------------------------
>>
>> compilation:
>>
>> ~/local/opt/mingw-w64-x86_32/bin/i686-w64-mingw32-gcc -std=gnu99 -c -g -O0
>> -Wall -W -Wextra -Wshadow -pipe -I/opt/efl/include
>> -I/home/torri/local/mingw-w64-x86_32/include
>> -I/home/torri/local/mingw-w64-x86_32/include/evil-0 conftest.c
>>
>> ---------------------------
>>
>> error:
>>
>> In file included from
>> /home/torri/local/opt/mingw-w64-x86_32/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/stdio.h:9:0,
>>                  from conftest.c:45:
>> /home/torri/local/opt/mingw-w64-x86_32/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/_mingw.h:701:1:
>> error: expected ‘)’ before ‘__attribute__’
>> /home/torri/local/opt/mingw-w64-x86_32/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/_mingw.h:701:1:
>> error: expected identifier or ‘(’ before ‘)’ token
>>
>> line 45 == #include <stdio.h>
>>
>>
>> Without #define always_inline __attribute__ ((always_inline)), it works
>
> I add a fix for this at revision 4585 to trunk.  This might be
> something for branches, too.

Done.

However Vincent should note that he should also use underscored
attribute names in his macro like:
#define always_inline __attribute__((__always_inline__))


>
> Cheers,
> Kai
>

--
O.S.

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to