r236101 - in /trunk/gcc: ChangeLog read-md.c re...

dmalcolm@gcc.gnu.org dmalcolm@gcc.gnu.org
Tue May 10 18:28:00 GMT 2016


Author: dmalcolm
Date: Tue May 10 18:28:10 2016
New Revision: 236101

URL: https://gcc.gnu.org/viewcvs?rev=236101&root=gcc&view=rev
Log:
Simplify read-md.c and read-rtl.c using require_char_ws

read-md.c and read-rtl.c repeatedly use this pattern:

    c = read_skip_spaces ();
    if (c != ')')
      fatal_expected_char (')', c);

Simplify them by introduce a helper function to do this.

gcc/ChangeLog:
	* read-md.c (require_char_ws): New function.
	(read_string): Simplify using require_char_ws.
	(handle_constants): Likewise.
	(handle_enum): Likewise.
	(handle_file): Likewise.
	* read-md.h (require_char_ws): New declaration.
	* read-rtl.c (read_conditions): Simplify using require_char_ws.
	(read_mapping): Likewise.
	(read_rtx_code): Likewise.
	(read_nested_rtx): Likewise.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/read-md.c
    trunk/gcc/read-md.h
    trunk/gcc/read-rtl.c



More information about the Gcc-cvs mailing list