}
}
else if (ch == 'D' && base == 10) {
- if (sgnswtch != 0) {
+ if (sgnswtch != 0 ||
+ tk->TOK_INT > max_int[(int)long_size]) {
lexwarning(W_ORDINARY, "overflow in constant");
}
toktype = longint_type;
tk->TOK_INT<=max_int[(int)word_size]) {
toktype = intorcard_type;
}
+ else if (! chk_bounds(tk->TOK_INT,
+ full_mask[(int)word_size],
+ T_CARDINAL)) {
+lexwarning(W_ORDINARY, "overflow in constant");
+ }
return tk->tk_symb = INTEGER;
}
df->df_next = id->id_def;
id->id_def = df;
if (kind == D_ERROR || kind == D_FORWARD) df->df_type = error_type;
+ if (kind & (D_TYPE|D_PROCEDURE|D_CONST)) {
+ df->df_flags = D_DEFINED;
+ }
/* enter the definition in the list of definitions in this scope
*/
for (; idlist; idlist = idlist->nd_right) {
df = define(idlist->nd_IDF, CurrentScope, D_VARIABLE);
df->df_type = type;
- /* df->df_flags &= ~(D_USED | D_DEFINED); */
if (idlist->nd_left) {
/* An address was supplied
*/
from this list.
*/
register t_def *df, *df1;
-#define INTERESTING (D_MODULE|D_PROCEDURE|D_PROCHEAD|D_VARIABLE|D_IMPORTED)
+#define INTERESTING (D_MODULE|D_PROCEDURE|D_PROCHEAD|D_VARIABLE|D_IMPORTED|D_TYPE|D_CONST)
df = 0;
df1 = *pdf;
same scope.
*/
df = define(nd->nd_IDF, CurrentScope, D_FORWTYPE);
+ df->df_flags |= D_USED | D_DEFINED;
if (df->df_kind == D_TYPE) {
(*ptp)->tp_next = df->df_type;
register t_def *df;
{
if (is_anon_idf(df->df_idf)) return;
- if (df->df_kind & (D_IMPORTED | D_VARIABLE | D_PROCEDURE)) {
+ if (df->df_kind & (D_IMPORTED | D_VARIABLE | D_PROCEDURE | D_CONST | D_TYPE)) {
struct node *nd;
if (df->df_flags & (D_EXPORTED | D_QEXPORTED)) return;
}
df = df1;
}
- if (! (df->df_kind & (D_VARIABLE|D_PROCEDURE))) return;
+ if (! (df->df_kind & (D_VARIABLE|D_PROCEDURE|D_TYPE|D_CONST))) return;
nd = df->df_scope->sc_end;
if (! (df->df_flags & D_DEFINED)) {
node_warning(nd,