This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51630] failure to detect missing


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51630

Robert Ramey <ramey at rrsd dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |WONTFIX

--- Comment #7 from Robert Ramey <ramey at rrsd dot com> 2011-12-21 05:39:49 UTC ---
what I expected was that -fsyntax-only would run the normal process but skip
the code generation.  I don't think that's an unreasonable expectation from the
name of the option and the simple description of it.

Also I wouldn't characterize the program as not having any syntax errors.  The
first example

name test2(){
    name x, y;
    return (x < y) ? y : x;
}

generates an compile time error as one would expect.  If the same code were
placed inside a macro, it would also provoke an error.  Then you move it into
at template - and voila - no syntax error.  This is not regular or intuitive
behavior.  When you tested it you also expected to see an error - to the extent
you tried on several versions of gcc.

If your asking me what I want, I would respond that the current behavior of the
-fsyntax-only is inconsistent and confusing and has room for improvement.  It's
not much of an answer to say "don't do that".  Taken to it's logical
conclusion, you might just skip emission of compile time errors all together
and replace them with the admonition - don't write incorrect code !

Anyway, thanks again for detecting this.

Robert Ramey


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]