bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] clang Warning - revisited


From: Peter Teeson
Subject: [Bug-apl] clang Warning - revisited
Date: Fri, 18 Apr 2014 20:36:58 -0400

Hi Jürgen:

I've been thinking again about this warning and I'm inclined to agree with it.

..MyProjects/GNUAPL/apl-svn/src/UserFunction.cc:1191:10: Comparison of constant 10 with _expression_ of type 'Function_Line' is always true

   if (l < 10)   ucs.append(UNI_ASCII_SPACE);


These suggestions eliminate the Warning.

In File APL_Types.hh

enum Function_Line
{
   Function_Retry  = -2,   // →'' in immediate execution
   Function_Line_0 = 0,
   Function_Line_1 = 1,
   Function_Line_MAX = 10  // << === My suggestion
};

In UserFunction.cc:1191:10:
   if (l < Function_Line_MAX)   ucs.append(UNI_ASCII_SPACE); // << === My suggestion


reply via email to

[Prev in Thread] Current Thread [Next in Thread]