Skip to content

content of repeated (unguarded) include placed on the same line #492

@firewave

Description

@firewave

From testsuite/clang-preprocessor-tests/print_line_include.c and uncovered by #490.

print_line_include.c

#include "print_line_include.h"
#include "print_line_include.h"

print_line_include.h

int x;

gcc -E output:

# 0 "testsuite/clang-preprocessor-tests/print_line_include.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "testsuite/clang-preprocessor-tests/print_line_include.c"
# 1 "testsuite/clang-preprocessor-tests/print_line_include.h" 1
int x;
# 2 "testsuite/clang-preprocessor-tests/print_line_include.c" 2
# 1 "testsuite/clang-preprocessor-tests/print_line_include.h" 1
int x;
# 3 "testsuite/clang-preprocessor-tests/print_line_include.c" 2

Actual:


#line 1 "testsuite/clang-preprocessor-tests/print_line_include.h"
int x ; int x ;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions