------- Additional Comments From chrisp_42 at bigpond dot com  2005-01-21 02:04 
-------
(In reply to comment #1)
> Hmm, is *- special operand in Ada or is this just a parse error in the
front-end (I don't know Ada that at 

You are actually fairly close.  *- is not a special operator, but the multiply
operator has a higher precedence than the unary minus.  This causes the multiply
to bind to the minus sign (not the result of the unary minus).

The fix is the write the code as follows:
  B := B*(-B);

This is actually fairly common in Ada.

This TR is invalid because the test case is invalid Ada code.
Whether or not the error message could be improved or not I dont know, but most
Ada programmers would immediately know what is wrong with the code.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19539

Reply via email to