Deleted Added
sdiff udiff text old ( 96549 ) new ( 96557 )
full compact
1/* Process declarations and variables for C compiler.
2 Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
3 2001, 2002 Free Software Foundation, Inc.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free

--- 5 unchanged lines hidden (view full) ---

14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING. If not, write to the Free
19Software Foundation, 59 Temple Place - Suite 330, Boston, MA
2002111-1307, USA. */
21
22/* $FreeBSD: head/contrib/gcc/c-decl.c 96549 2002-05-14 00:30:25Z obrien $ */
23
24/* Process declarations and symbol lookup for C front end.
25 Also constructs types; the standard scalar types at initialization,
26 and structure, union, array and enum types when they are declared. */
27
28/* ??? not all decl nodes are given the most useful possible
29 line numbers. For example, the CONST_DECLs for enum values. */
30

--- 343 unchanged lines hidden (view full) ---

374
375int warn_traditional;
376
377/* Nonzero means warn about sizeof(function) or addition/subtraction
378 of function pointers. */
379
380int warn_pointer_arith;
381
382/* Nonzero means warn for non-prototype function decls
383 or non-prototyped defs without previous prototype. */
384
385int warn_strict_prototypes;
386
387/* Nonzero means warn for any global function def
388 without separate previous prototype decl. */
389

--- 136 unchanged lines hidden (view full) ---

526 iso_1994:
527 flag_traditional = 0;
528 flag_writable_strings = 0;
529 flag_no_asm = 1;
530 flag_no_nonansi_builtin = 1;
531 flag_noniso_default_format_attributes = 0;
532 flag_isoc99 = 0;
533 flag_bsd_format = 0;
534 }
535 else if (!strcmp (argstart, "iso9899:199409"))
536 {
537 flag_isoc94 = 1;
538 goto iso_1994;
539 }
540 else if (!strcmp (argstart, "iso9899:199x")
541 || !strcmp (argstart, "iso9899:1999")
542 || !strcmp (argstart, "c9x")
543 || !strcmp (argstart, "c99"))
544 {
545 flag_traditional = 0;
546 flag_writable_strings = 0;
547 flag_no_asm = 1;
548 flag_no_nonansi_builtin = 1;
549 flag_noniso_default_format_attributes = 0;
550 flag_isoc99 = 1;
551 flag_isoc94 = 1;
552 flag_bsd_format = 0;
553 }
554 else if (!strcmp (argstart, "gnu89"))
555 {
556 flag_traditional = 0;
557 flag_writable_strings = 0;
558 flag_no_asm = 0;
559 flag_no_nonansi_builtin = 0;
560 flag_noniso_default_format_attributes = 1;
561 flag_isoc99 = 0;
562 flag_isoc94 = 0;
563 flag_bsd_format = 0;
564 }
565 else if (!strcmp (argstart, "gnu9x") || !strcmp (argstart, "gnu99"))
566 {
567 flag_traditional = 0;
568 flag_writable_strings = 0;
569 flag_no_asm = 0;
570 flag_no_nonansi_builtin = 0;
571 flag_noniso_default_format_attributes = 1;
572 flag_isoc99 = 1;
573 flag_isoc94 = 1;
574 flag_bsd_format = 0;
575 }
576 else if (!strcmp (argstart, "bsd"))
577 {
578 flag_traditional = 0;
579 flag_writable_strings = 0;
580 flag_no_asm = 0;
581 flag_no_nonansi_builtin = 0;
582 flag_noniso_default_format_attributes = 1;
583 flag_isoc99 = 0;
584 flag_isoc94 = 0;
585 flag_isoc94 = 0;
586 flag_bsd_format = 1;
587 }
588 else
589 error ("unknown C standard `%s'", argstart);
590 }
591 else if (!strcmp (p, "-fdollars-in-identifiers"))
592 dollars_in_ident = 1;
593 else if (!strcmp (p, "-fno-dollars-in-identifiers"))
594 dollars_in_ident = 0;

--- 5713 unchanged lines hidden (view full) ---

6308 old_decl = IDENTIFIER_IMPLICIT_DECL (DECL_NAME (decl1));
6309
6310 /* Optionally warn of old-fashioned def with no previous prototype. */
6311 if (warn_strict_prototypes
6312 && TYPE_ARG_TYPES (TREE_TYPE (decl1)) == 0
6313 && !(old_decl != 0
6314 && (TYPE_ARG_TYPES (TREE_TYPE (old_decl)) != 0
6315 || (DECL_BUILT_IN (old_decl)
6316 && ! C_DECL_ANTICIPATED (old_decl)))))
6317 warning ("function declaration isn't a prototype");
6318 /* Optionally warn of any global def with no previous prototype. */
6319 else if (warn_missing_prototypes
6320 && TREE_PUBLIC (decl1)
6321 && !(old_decl != 0
6322 && (TYPE_ARG_TYPES (TREE_TYPE (old_decl)) != 0
6323 || (DECL_BUILT_IN (old_decl)
6324 && ! C_DECL_ANTICIPATED (old_decl))))

--- 1200 unchanged lines hidden ---