diff --git a/vlib/compiler/comptime.v b/vlib/compiler/comptime.v index d10ee01e3c..e4b28fbc57 100644 --- a/vlib/compiler/comptime.v +++ b/vlib/compiler/comptime.v @@ -201,6 +201,11 @@ fn (p mut Parser) chash() { } if hash.starts_with('include') { if p.first_pass() && !p.is_vh { + if !p.pref.building_v && !p.fileis('vlib') { + p.warn('C #includes will soon be removed from the language' + + '\ndefine the C structs and functions in V') + + } if p.file_pcguard.len != 0 { //println('p: $p.file_platform $p.file_pcguard') p.cgen.includes << '$p.file_pcguard\n#$hash\n#endif' diff --git a/vlib/compiler/struct.v b/vlib/compiler/struct.v index 2326b0e70e..e085545d89 100644 --- a/vlib/compiler/struct.v +++ b/vlib/compiler/struct.v @@ -37,6 +37,11 @@ fn (p mut Parser) struct_decl() { } is_c := name == 'C' && p.tok == .dot if is_c { + if !p.pref.building_v && !p.fileis('vlib') { + p.warn('Virtual C structs will soon be removed from the language' + + '\ndefine the C structs and functions in V') + } + p.check(.dot) name = p.check_name() cat = .c_struct