Changeset 8781e9d in mainline for tools/autocheck.awk
- Timestamp:
- 2018-11-12T20:20:36Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 08f1a6d
- Parents:
- 15639ec
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-12 20:09:40)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-12 20:20:36)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/autocheck.awk
r15639ec r8781e9d 38 38 39 39 /}.*;/ { 40 pattern = "}( __attribute__\\(.*\\))? (" struct_name "_t)?;" 41 if ($0 !~ pattern) { 42 print("Bad struct ending: " $0) > "/dev/stderr" 43 exit 1 40 pattern = "}( __attribute__\\(.*\\))? " struct_name "_t;" 41 if ($0 ~ pattern) { 42 macro_name = toupper(struct_name) "_SIZE" 43 print "_Static_assert(" macro_name " == sizeof(struct " struct_name "), \"\");" 44 struct_name = "" 44 45 } 45 macro_name = toupper(struct_name) "_SIZE"46 print "_Static_assert(" macro_name " == sizeof(struct " struct_name "), \"\");"47 struct_name = ""48 46 } 49 47 50 48 /;$/ { 51 if (struct_name != "" ) {49 if (struct_name != "" && $0 !~ "}") { 52 50 # Remove array subscript, if any. 53 51 sub("(\\[.*\\])?;", "", $0)
Note:
See TracChangeset
for help on using the changeset viewer.