public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/1940: No option for turning off reporting of mismatched "{" "}"
@ 2002-10-21 17:30 zack
  0 siblings, 0 replies; 2+ messages in thread
From: zack @ 2002-10-21 17:30 UTC (permalink / raw)
  To: craigs, gcc-bugs, gcc-prs, nobody

Synopsis: No option for turning off reporting of mismatched "{" "}"

State-Changed-From-To: open->closed
State-Changed-By: zack
State-Changed-When: Mon Oct 21 17:30:29 2002
State-Changed-Why:
    This warning is no longer issued for any code, as of gcc 3.0.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=1940


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c++/1940: No option for turning off reporting of mismatched "{" "}"
@ 2001-04-01  0:00 craigs
  0 siblings, 0 replies; 2+ messages in thread
From: craigs @ 2001-04-01  0:00 UTC (permalink / raw)
  To: gcc-gnats

>Number:         1940
>Category:       c++
>Synopsis:       No option for turning off reporting of mismatched "{" "}"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 11 16:36:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Craig Southeren
>Release:        g++ 2.96 20000814 and later
>Organization:
>Environment:
Linux 2.2.14 kernel
>Description:
Gcc (since version 2.96) performs a check on every source 
file to ensure that every "{" is matched by a "}". This is
fine for most source files, but is not strictly required by either C or
C++.

  In any case, the OpenH323 project makes extensive use of 
the ability to start a class definition in one file, and 
then complete it in another file. We use the technique to 
provide a platform independent header for each class, which
is then completed by a file containing any platform
dependent declarations for that class.

  Our project contains hundreds of constructs of this type, and we
cannot easily change it as this point. Unfortunately, this 
warning cannot be disabled, so using any compiler after 
2.95.3 creates hundreds of lines of spurious warning per 
compilation unit.
~
>How-To-Repeat:
Download the OpenH323 source code from http://www.openh323.org
and compile with any 2.96 compiler
>Fix:
Find patch attached
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="t.txt"
Content-Disposition: inline; filename="t.txt"

*** orig.decl2.c        Thu Aug 17 23:38:06 2000
--- decl2.c     Thu Aug 17 23:56:44 2000
*************** int warn_nontemplate_friend = 1;
*** 353,358 ****
--- 353,361 ----

  int warn_deprecated = 1;

+ /* Nonzero means warn about files with unmatched braces */
+ int warn_unmatched_braces = 1;
+
  /* Nonzero means `$' can be in an identifier.  */

  #ifndef DOLLARS_IN_IDENTIFIERS
*************** lang_decode_option (argc, argv)
*** 784,789 ****
--- 787,794 ----
        warn_nontemplate_friend = setting;
        else if (!strcmp (p, "deprecated"))
          warn_deprecated = setting;
+       else if (!strcmp (p, "unmatched-braces"))
+         warn_unmatched_braces = setting;
        else if (!strcmp (p, "comment"))
        ;                       /* cpp handles this one.  */
        else if (!strcmp (p, "comments"))


*** orig.lex.c  Thu Aug 17 23:38:57 2000
--- lex.c       Thu Aug 17 23:57:01 2000
*************** linenum:
*** 2265,2271 ****
              --pending_lang_change;
            }

!         if (indent_level != input_file_stack->indent_level)
            {
              warning_with_file_and_line
                (input_filename, lineno,
--- 2265,2271 ----
              --pending_lang_change;
            }

!         if (warn_unmatched_braces && (indent_level != input_file_stack->indent_level))
            {
              warning_with_file_and_line
                (input_filename, lineno,


*** orig.cp-tree.h      Fri Aug 18 00:27:09 2000
--- cp-tree.h   Fri Aug 18 00:27:12 2000
*************** extern int warn_multichar;
*** 3226,3231 ****
--- 3226,3235 ----
     flag_guiding_decls in do_friend. */
  extern int warn_nontemplate_friend;

+ /* Nonzero means warn about files with unmatched braces */
+ extern int warn_unmatched_braces;
+
+
  /* in c-common.c */
  extern void declare_function_name               PARAMS ((void));
  extern void decl_attributes                     PARAMS ((tree, tree, tree));


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-22  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-21 17:30 c++/1940: No option for turning off reporting of mismatched "{" "}" zack
  -- strict thread matches above, loose matches on Subject: below --
2001-04-01  0:00 craigs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).