On Sat, Feb 18, 2012 at 7:56 AM, JonY <[email protected]> wrote:
> On 2/18/2012 14:37, Vincent Torri wrote:
>> On Sat, Feb 18, 2012 at 7:08 AM, Vincent Torri <[email protected]>
>> wrote:
>>> On Sat, Feb 18, 2012 at 1:40 AM, JonY <[email protected]> wrote:
>>>> On 2/18/2012 07:45, Vincent Torri wrote:
>>>>> hey
>>>>>
>>>>> i have that code in a header file :
>>>>>
>>>>> static __forceinline __m128i mul_256_sse3(__m128i a, __m128i c) { *** }
>>>>>
>>>>> and gcc (4.7) complains with the error "error: multiple storage
>>>>> classes in declaration specifiers"
>>>>>
>>>>> does someone know why ?
>>>>>
>>>>> thank you
>>>>>
>>>>> Vincent Torri
>>>>
>>>>
>>>> __forceinline is defined to
>>>>
>>>> extern __inline__ __attribute__((__always_inline__,__gnu_inline__))
>>>>
>>>> static and extern don't play well together.
>>>
>>> haa, ok :) Btw, do you know if there will be the same problem with vc++ ?
>>>
>>> thank you
>>>
>>> Vincent Torri
>>
>> I asked because i saw plenty of code with google using "static
>> __forceinline", and i don't see anything about the use of
>> __forceinline and static in MSDN
>> (http://msdn.microsoft.com/fr-fr/library/z8y1yy88.aspx)
>>
>> Vincent Torri
>>
>
> Sorry, I'm not sure how MSVC does __forceinline, may need some
> correction if it does it differently.
I've compiled that code:
[code]
static __forceinline int f(void) { return 1; }
int main()
{
int i = f();
return 0;
}
[/code]
with gcc:
torri:~/code: ~/local/opt/mingw-w64-x86_32/bin/i686-w64-mingw32-gcc
-o forceinline forceinline.c
forceinline.c:1:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘int’
with Visual Studio 2008: no error, nor warning. Here is the output
(in french, sorry) :
------ Début de la génération : Projet : forceinline, Configuration :
Debug Win32 ------
Compilation en cours...
main.cpp
Édition des liens en cours...
Incorporation du manifeste en cours...
Le journal de génération a été enregistré à l'emplacement
"file://c:\Documents and Settings\torri\Mes documents\Visual Studio
2008\Projects\forceinline\forceinline\Debug\BuildLog.htm"
forceinline - 0 erreur(s), 0 avertissement(s)
========== Génération : 1 a réussi, 0 a échoué, 0 mis à jour, 0 a été
ignoré ==========
Vincent Torri
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public