Skip to content

The identifier char is not mangled in C backend #2359

Closed
@Thirumalai-Shaktivel

Description

@Thirumalai-Shaktivel

MRE

char: str
char = ""
$ lpython examples/expr2.py --backend=c  
expr2__tmp__generated__.c:13:8: error: expected identifier or '('
char * char = NULL;
       ^
expr2__tmp__generated__.c:16:23: error: expected expression
    _lfortran_strcpy(&char, "", 1);
                      ^
2 errors generated.
The command 'gcc -o expr2.out expr2__tmp__generated__.c  -I /Users/thirumalai/Open_Source/lpython/src/bin/../libasr/runtime -L"/Users/thirumalai/Open_Source/lpython/src/bin/../runtime" -Wl,-rpath,"/Users/thirumalai/Open_Source/lpython/src/bin/../runtime" -llpython_runtime -lm' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcLabel for C language related changeseasy to fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions