[Interest] error: taking address of temporary [-fpermissive]

Nikos Chantziaras realnc at gmail.com
Fri Jun 1 18:34:49 CEST 2012


On 01/06/12 19:11, Robert Wood wrote:
> Folks,
>
> I have just upgraded to Mageia Linux 2 and am now getting this compile
> error:
>
> error: taking address of temporary [-fpermissive]
>
> This was previously compiling just fine.
>
> I'm now running Creator 2.4.1 Based on Qt 4.8.0.
>
> Anyone know what is going on please?


You are doing this:

   class A;
   void foo(A*);
   ...
   foo(&A());

(Or something very similar.)

Which is wrong.  The compiler is correct; it's an error :-)




More information about the Interest mailing list