[Libre-soc-bugs] [Bug 1250] New: pseudocode should avoid using strings as constants

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Jan 14 18:19:52 GMT 2024


https://bugs.libre-soc.org/show_bug.cgi?id=1250

            Bug ID: 1250
           Summary: pseudocode should avoid using strings as constants
           Product: Libre-SOC's first SoC
           Version: unspecified
          Hardware: PC
                OS: Windows
            Status: CONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Source Code
          Assignee: lkcl at lkcl.net
          Reporter: ghostmansd at gmail.com
                CC: libre-soc-bugs at lists.libre-soc.org
   NLnet milestone: ---

Sometimes our pseudocode uses strings as enumeration values. This is bad for
both Python and is especially bad for C. Example:

* fcfids  FRT,FRB (Rc=0)
* fcfids. FRT,FRB (Rc=1)

Pseudo-code:

    FRT <- INT2FP(FRB, 'sint2single')

The second argument is a string, which means that we would use strcmp in C code
which just performs an int->fp conversion. Whilst this is not a blocker, I
recommend to reconsider these. We could either use some special token
(literally matching 'sint2single' along with the quotes), or, better, fix the
pseudocode to use an integer literal.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list