Age | Commit message (Collapse) | Author | Files |
|
|
|
See https://savannah.gnu.org/bugs/?44113
* src/parser.c (cleanup_stack): Ignore negative deltas.
(parse_function_declaration): Don't set caller if the symbol
is in automatic storage. Note: that means nested function definitions
can't be handled.
* tests/invalid.at: New test case.
* tests/Makefile.am: Add new test case.
* tests/testsuite.at: Likewise.
|
|
* src/parser.c (fake_struct)
(parse_variable_declaration): Correctly determine end of type.
* tests/decl01.at: New test case.
* tests/Makefile.am: Add new test.
* tests/testsuite.at (CFLOW_CHECK_PROG): Don't add extra newline
at the end of expout. All uses updated.
|
|
* .gitmodules: Add imprimatur as a submodule.
* Makefile.am: Update ACLOCAL_AMFLAGS
* configure.ac: Initialize imprimatur
* doc/Makefile.am: Likewise.
* doc/gendocs.sh: New file.
* doc/rendition.texi: Remove.
|
|
|
|
|
|
|
|
* doc/cflow.1: Document exit codes.
* doc/cflow.texi: Likewise.
* src/cflow.h: Define exit code constants.
* src/main.c: Use exit codes consistently.
* src/output.c: Likewise.
* src/parser.c: Likewise.
* src/posix.c: Likewise.
* src/rc.c: Likewise.
|
|
|
|
|
|
|
|
|
|
This fixes bug #31792.
* bootstrap (gnulib_extra_files): Remove "missing"
* gnulib: Upgrade
* gnulib.modules: Add xalloc.
* src/Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
* src/parser.c (token_type_str)
(dbgtok,debugtoken): New diagnostic functions.
(tokdel,tokins): New functions.
(nexttoken): Clear yylval.str. Print token stack state.
(putback): Copy all data to tok. Print token stack state.
(file_error,restore
(is_function): Hanlde struct, union and enum: all these can
appear in the return type specification.
(fake_struct): Don't destroy token stack. Use tokdel and tokins
to modify it.
(parse_variable_declaration): Likewise.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at: Likewise.
* tests/struct02.at: New file.
* tests/struct03.at: New file.
* tests/struct04.at: New file.
|
|
* NEWS: Update.
* README: Update.
* doc/cflow.texi: Update.
* src/main.c (symbol_override): pass allocated argument to install.
* src/parser.c (yyparse): Return 0.
|
|
* src/parser.c (dcl): allow for qualifier wherever a modifier
is allowed.
|
|
|
|
* doc/cflow.texi: Document symbol classes and aliases.
* src/cflow.rc: Minor change.
* src/main.c: Mention aliasing feature in the docstring for --symbol.
|
|
|
|
The latter feature is useful for declaring reserved symbols such
as __restrict or __inline, e.g. --symbol __restrict:=restrict
instructs cflow to treat `__restrict' exactly as `restrict'.
* src/Makefile.am: Minor fix in rule for flowgraph.
* src/c.l (init_tokens): New function, separated from
init_lex.
Install qualifiers.
* src/cflow.h (symbol_alias): New flag.
(symbol)<alias>: New member.
(INSTALL_DEFAULT,INSTALL_OVERWRITE)
(INSTALL_CHECK_LOCAL,INSTALL_UNIT_LOCAL): New defines.
* src/cflow.rc: Rewrite for use with --cpp='gcc -E'
* src/main.c (symbol_override): Extend syntax to allow for defining
aliases to other tokens (--symbol __inline:=inline).
* src/parser.c (print_token): print qualifiers and ops.
(file_error): Change signature. All uses changed.
(save_token): Improve output spacing.
(skip_balanced): Treat LBRACE0 and RBRACE0 as { and }.
(is_function): allow for qualifiers and wrappers before
defintion.
(parse_function_declaration): Remove PARM_WRAPPER case: it
is taken care of by the caller.
(fake_struct): leave when '(' is encountered.
(parse_variable_declaration): Allow for qualifiers before
the identifier.
(skip_struct): Use skip_balanced.
(dcl): Handle wrappers. Leave if a semicolon is encountered.
(dirdcl): Optimize handing of wrapper.
(maybe_parm_list): Handle qualifiers.
(declare): allow for wrappers.
(declare_type): Pass INSTALL_UNIT_LOCAL as a flag to install.
* src/symbol.c (lookup): Argument is const now.
(install): Change semantics of the 2nd argument.
(install_ident): Change the call to install accordingly.
* tests/nfparg.at: Change spacing to reflect changes to
save_token.
|
|
* src/cflow.h (install): Change prototype.
* src/parser.c (skip_balanced): Don't put extra token back.
* src/symbol.c (install): Take two arguments, the 2nd one
specifying whether the symbol can be local to the compilation
unit. All uses updated.
(delete_symbol): Don't delete symbol in reverse tree mode, if
its callee list is not empty.
|
|
* src/parser.c (save_token): Hanlde [ and ]. Do not enforce
space after ).
* tests/fdecl.at: Reflect changes in spacing.
* tests/knr.at: Likewise.
* tests/multi.at: Likewise.
* tests/pwrapper.at: Likewise.
* tests/struct00.at: Likewise.
* tests/struct01.at: Likewise.
|
|
* src/c.l: Handle "inline" keyword.
* src/main.c (symbol_optype): Add "qualifier".
* src/parser.c (print_token): Correctly handle
PARM_WRAPPER and STRING.
(save_token): Handle QUALIFIER.
In verbose mode, warn about unexpected symbols.
(yyparse): Handle QUALIFIER and PARM_WRAPPER.
* src/parser.h (QUALIFIER): New define.
|
|
* src/c.l (get_token): do not call yylex if previous call returned
EOF.
(source): Clear EOF indicator.
* src/linked-list.c: Placate gcc warnings.
* src/output.c: Likewise.
* src/parser.c (skip_balanced): New function.
(skip_struct): Allow for a wrapper after closing brace.
* tests/struct00.at: New testcase.
* tests/struct01.at: New testcase.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at: Likewise.
* NEWS, configure.ac: Set version 1.4
* THANKS: Update.
|
|
* src/parser.c (func_body): Reset caller when the topmost block is closed.
|
|
* src/output.c (direct_tree)
(inverted_tree): Use is_last instead of is_printable to decide
what mark to use for the line.
* tests/bartest.at: New testcase.
* tests/Makefile.am: Add bartest.at
* tests/testsuite.at: Include bartest.at
|
|
Happy GNU Year!
|
|
* bootstrap.conf: Ignore .bootstrap.
|
|
* .gitmodules: Make gnulib a submodule.
* Makefile.am (SUBDIRS): Rename `lib' to `gnu'.
* configure.ac: Likewise.
* README-hacking: Update
* bootstrap, bootstrap.conf: Update.
* gnulib.modules: Remove `malloc'.
* lib/Makefile.am: Remove.
* lib/argcv.c, lib/argcv.h: Move to src.
* po/POTFILES.in, src/Makefile.am: Reflect the above changes.
* src/parser.c (declare): Improve diagnostic messages.
|
|
* configure.ac, NEWS: Raise patchlevel number.
* Makefile.am (alpha, alphacheck): New rules.
|
|
* src/depmap.c: New file.
* src/Makefile.am: Add depmap.c.
* src/cflow.h (struct symbol.ord): New member.
(collect_symbols): Change signature. All callers
updated.
(collect_functions): New proto.
(symbol_is_function): New proto.
(cflow_depmap_t): New data type.
(depmap_alloc, depmap_set)
(depmap_isset, depmap_tc): New prototypes.
* src/output.c (symbol_is_function): New function.
(scan_tree): Remove.
(tree_output): Use depmap to find out recursive calls.
* src/symbol.c (static_func_list): New list.
(static_free): Add static functions to static_func_list.
(collect_symbols): Return size_t. Take additional number
of slots in the 3rd argument.
(collect_functions): New function.
|
|
* src/c.l: Include cflow.h (and, consequently, config.h) at the top
of the generated source.
(prev_token): New static.
(get_token): Set prev_token.
(ident): Treat any valid identifier after struct/union/enum
as identifier (do not attempt any symbol lookup).
|
|
|
|
* src/parser.c (parse_variable_declaration): Skip eventual modifiers
before the ident.
|
|
* src/Makefile.am (cflow_SOURCES): Order sources.
* src/cflow.h (struct linked_list_entry): Add new member: list.
(struct symbol): New members: owner, entry
(install_ident, ident_change_storage): New prototypes.
(linked_list_iterate, linked_list_unlink)
(data_in_list): New prototypes.
* src/linked-list.c (linked_list_append)
(linked_list_iterate): Update for doubly-linked lists.
(linked_list_unlink): New function.
(linked_list_prepend): Comment out: not used this far.
* src/parser.c: Use install_ident and ident_change_storage.
* src/symbol.c: Keep information about automatic
variables/parameters (on a per-function basis) and static
identifiers (on a per-module basis) in two separate linked
lists. This speeds up cleanup procedures.
|
|
* src/cflow.h (Cons, Consptr, CAR, CDR): Remove
(struct linked_list_entry): New type.
(struct linked_list): New type.
(linked_list_free_data_fp): New typedef.
(struct symbol): Change types of ref_line, callee and caller
to struct linked_list. All usages changed.
(linked_list_head): New define.
(linked_list_create, linked_list_destroy)
(linked_list_append, linked_list_prepend): New prototypes.
(cleanup, append_to_list): Remove
* src/main.c (arglist): Change type to struct linked_list
* src/output.c, src/parser.c, src/symbol.c: Use new
linked list functions.
|
|
* Makefile.am: Improve ChangeLog rule
* configure.ac: Remove AH_BOTTOM
* gnulib.modules: Add argp-version-etc, progname.
Remove version-etc.
* src/main.c: Use argp-version-etc
|
|
* src/main.c (symbol_override): Fix conditional logic to prevent
coredump on invalid usage. Require that the argument always have
':' in it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|