#198 Parameter passing error

closed-fixed
3
2013-05-25
2001-10-28
No

#include <stdio.h>

// unsigned is important to reproduce the bug
char foo2 (unsigned char uc) reentrant;

foo()
{
// parameter "4" is pushed on the stack
// instead of moved into dpl
foo2 (4));d",
}

Discussion

  • Johan Knol

    Johan Knol - 2001-10-29

    Logged In: YES
    user_id=63512

    Assuming > foo2(4));d" < should read > foo2(4); < I see
    nothing wrong.

     
  • Johan Knol

    Johan Knol - 2001-10-29
    • milestone: --> 100456
    • priority: 5 --> 3
    • status: open --> open-works-for-me
     
  • Johan Knol

    Johan Knol - 2001-10-29

    Logged In: YES
    user_id=63512

    Assuming > foo2(4));d" < should read > foo2(4); < I see
    nothing wrong.

     
  • Bernhard Held

    Bernhard Held - 2001-10-30

    Logged In: YES
    user_id=203539

    Wrong source, please try with:

    #include <stdio.h>

    // unsigned is important to reproduce the bug
    char foo2 (unsigned char uc) reentrant;

    foo()
    {
    // parameter "4" is pushed on the stack
    // instead of moved into dpl
    printf("%d", foo2 (4));
    }

     
  • Johan Knol

    Johan Knol - 2001-10-30

    Logged In: YES
    user_id=63512

    fixed in SDCCast.c:1.99

     
  • Johan Knol

    Johan Knol - 2001-10-30
    • assigned_to: nobody --> johanknol
    • labels: 101550 --> C-Front End
    • milestone: 100456 --> fixed
    • status: open-works-for-me --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks