Menu

#1996 long long integer constants

closed-fixed
Ben Shi
other
8
2016-04-10
2012-03-30
No

AFAIR, historically, long long constants have been missing feature, i.e. they only worked inside the range of long constants,and there was an out of range warning otherwise.
Recently, it seems that long long constants only work in the range 0 to 127 or so. Other values result in wrong code being generated silently (tyüpically a value that is all-zero except for the lowest byte).

Philipp

Discussion

  • Philipp Klaus Krause

    • priority: 6 --> 8
     
  • Philipp Klaus Krause

    While long long is new functionality, something as basic as integer constants really shouldn't fail silently. Thus increasing priority.

    Philipp

     
  • Maarten Brock

    Maarten Brock - 2012-04-02

    Are you sure no 'pedantic' warning is generated? Remember that regression tests are run with --less-pedantic.

     
  • Philipp Klaus Krause

    I do get a "warning 158: overflow in implicit constant conversion" for really big values, but it seems there are some smaller constants for which the code is (or was) wrong but no there is no warning.

    Philipp

     
  • Philipp Klaus Krause

    In revision #7923 I implemented a warning for long long literals, since this bug seems to take some time to fix.

    Philipp

     
  • Philipp Klaus Krause

    There have been a lot of long long fixes around the end of 2014 / beginning of 2015. The situation with long long literals improved a lot, but there are a few remaining issues.

    Philipp

     
  • Ben Shi

    Ben Shi - 2015-06-17

    Bug [#1945] is a (partial?) duplicate, which is about type promotion from ulong to longlong.

     

    Related

    Bugs: #1945


    Last edit: Maarten Brock 2015-06-17
  • Ben Shi

    Ben Shi - 2015-07-22
    • Category: --> other
     
  • Ben Shi

    Ben Shi - 2015-08-26

    There are still several tests disabled in longlong.c, which need more work to do.

     
  • Ben Shi

    Ben Shi - 2015-11-25

    todo,

    1. division, shift
    2. enable more regression test cases
    3. double2ull has precision loss
    4. gbz80, hc08 specific issues
     
  • Ben Shi

    Ben Shi - 2016-03-04

    Can we remove warning #212 after revision 9510?

    1. I added more tests in longlong.c which had cover most longlong operation (+ - * / % & | ~ ^ << >> comparason), and they all passed on stm8 and z80 family.
    2. Though there are remaining longlong issues, they are specific ones but not common defects.
     
    • Philipp Klaus Krause

      IMO, the warning is no longer needed.

      Philipp

       
  • Ben Shi

    Ben Shi - 2016-03-04

    Remaining long long issues,

    bug #2477
    bug #2329
    bug #2118

     
  • Ben Shi

    Ben Shi - 2016-03-28

    It seems long long support has gained big improvements after revision #9527.

    1. More long long test cases (in the attached tests.zip) can be enabled.
    2. There are still several failed long long test cases, and I will look into them later.
     
  • Ben Shi

    Ben Shi - 2016-04-10

    Currently all regression test cases have been enabled and passed on stm8 and z80 family (except gbz80).

    Though there are remaining issues, they are port specific not common ones.

    bug #2329
    bug #2118

     
  • Ben Shi

    Ben Shi - 2016-04-10
    • status: open --> closed-fixed
    • assigned_to: Ben Shi
     

Log in to post a comment.