mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-21 06:30:41 +00:00
Treat static followed by extern declarations as specifying internal linkage.
See C17 section 6.2.2 p4-5.
This commit is contained in:
parent
82b2944eb8
commit
e168a4d6cb
@ -2049,6 +2049,9 @@ if space <> fieldListSpace then begin {are we defining a function?}
|
|||||||
Error(42)
|
Error(42)
|
||||||
else begin
|
else begin
|
||||||
itype := MakeCompositeType(cs^.itype, itype);
|
itype := MakeCompositeType(cs^.itype, itype);
|
||||||
|
if class = externsy then
|
||||||
|
if cs^.class = staticsy then
|
||||||
|
class := staticsy;
|
||||||
p := cs;
|
p := cs;
|
||||||
needSymbol := false;
|
needSymbol := false;
|
||||||
end; {else}
|
end; {else}
|
||||||
|
2
cc.notes
2
cc.notes
@ -1966,6 +1966,8 @@ int foo(int[42]);
|
|||||||
|
|
||||||
218. If a function declared within a block had the same name as a variable in an outer scope, the symbol table entry for that variable could be corrupted, leading to spurious errors or incorrect code generation.
|
218. If a function declared within a block had the same name as a variable in an outer scope, the symbol table entry for that variable could be corrupted, leading to spurious errors or incorrect code generation.
|
||||||
|
|
||||||
|
219. If a function is first declared as "static" and then subsequently redeclared or defined as "extern" or with no storage-class specifier, it should be private to the source file, the same as if it was just declared "static".
|
||||||
|
|
||||||
-- Bugs from C 2.1.0 that have been fixed -----------------------------------
|
-- Bugs from C 2.1.0 that have been fixed -----------------------------------
|
||||||
|
|
||||||
1. In some situations, fread() reread the first 1K or so of the file.
|
1. In some situations, fread() reread the first 1K or so of the file.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user