/* Source-language-related definitions for GDB.
- Copyright (C) 1991-2018 Free Software Foundation, Inc.
+ Copyright (C) 1991-2019 Free Software Foundation, Inc.
Contributed by the Department of Computer Science at the State University
of New York at Buffalo.
struct parser_state;
class compile_instance;
struct completion_match_for_lcd;
+class innermost_block_tracker;
#define MAX_FORTRAN_DIMS 7 /* Maximum number of F77 array dims. */
la_parser, perform any remaining processing necessary to complete
its translation. *EXPP may change; la_post_parser is responsible
for releasing its previous contents, if necessary. If
- VOID_CONTEXT_P, then no value is expected from the expression. */
+ VOID_CONTEXT_P, then no value is expected from the expression.
+ If COMPLETING is non-zero, then the expression has been parsed
+ for completion, not evaluation. */
- void (*la_post_parser) (expression_up *expp, int void_context_p);
+ void (*la_post_parser) (expression_up *expp, int void_context_p,
+ int completing, innermost_block_tracker *tracker);
void (*la_printchar) (int ch, struct type *chtype,
struct ui_file * stream);
struct gdbarch *gdbarch,
const struct block *expr_block,
CORE_ADDR expr_pc);
-
- /* Add fields above this point, so the magic number is always last. */
- /* Magic number for compat checking. */
-
- long la_magic;
-
};
-#define LANG_MAGIC 910823L
-
/* Pointer to the language_defn for our current language. This pointer
always points to *some* valid struct; it can be used without checking
it for validity.
set_language (SYMBOL_LANGUAGE (sym));
}
else
- m_switched = false;
+ {
+ m_switched = false;
+ /* Assign to m_lang to silence a GCC warning. See
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635. */
+ m_lang = language_unknown;
+ }
}
~scoped_switch_to_sym_language_if_auto ()