Skip to content

[clang-repl] Duplicate definition error for symbols while run in C mode #164596

@anutosh491

Description

@anutosh491

Something like this fails

Example 1

anutosh491@Anutoshs-MacBook-Air bin % ./clang-repl --Xcc=-x --Xcc=c --Xcc=-std=c23 
clang-repl> #include <stdio.h> 
clang-repl> char *p; 
clang-repl> printf("ok\n"); 
error: Duplicate definition of symbol '_p'

OR

Example 2

anutosh491@Anutoshs-MacBook-Air bin % ./clang-repl --Xcc=-x --Xcc=c --Xcc=-std=c23 
clang-repl> int x; 
clang-repl> int y; 
error: Duplicate definition of symbol '_x'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions