Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pragma weak ignoring more than 1 alias when placed before the declaration #28985

Closed
Labels
bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"
@llvmbot

Description

@llvmbot
Bugzilla Link28611
Versiontrunk
OSLinux
ReporterLLVM Bugzilla Contributor
CC@hfinkel

Extended Description

cat a.c
#pragma weak a = bad
#pragma weak b = bad
#pragma weak c = bad
void bad(int *info ) { *info = 0 ; }

clang a.c -c
readelf -sW a.o
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS a.c
2: 0000000000000000 32 FUNC WEAK DEFAULT 2 a
3: 0000000000000000 32 FUNC GLOBAL DEFAULT 2 bad

Note that, the symbol b and c are missing.

This is gcc behavior:
8: 0000000000000000 52 FUNC GLOBAL DEFAULT 1 bad
9: 0000000000000000 52 FUNC WEAK DEFAULT 1 a
10: 0000000000000000 52 FUNC WEAK DEFAULT 1 b
11: 0000000000000000 52 FUNC WEAK DEFAULT 1 c

clang -v
clang version 3.9.0 (trunk 264998) (llvm/trunk 264997)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp