www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2643] New: -o- switch bearks semantic analysis

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2643

           Summary: -o- switch bearks semantic analysis
           Product: D
           Version: 2.023
          Platform: PC
               URL: http://digitalmars.com/d/2.0/dmd-windows.html#switches
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: maxmo pochta.ru


---
module Test;

interface NetworkListener
{
    void onConnect();
}

class SoundManager : private NetworkListener
{
    private final void onConnect()
    {
    }
}
---
compiling this code with -c -o- switches yields no error messages, while
compilation with -c switch yields error.

dmd -c tmp.d -o- -I.. -w

dmd -c tmp.d -I.. -w

isn't implemented --
Feb 03 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2643





------- Comment #1 from shro8822 vandals.uidaho.edu  2009-02-03 10:46 -------

that's not a bug if you look at it a different way; -o- is to allow generating
ddoc output without having to run everything. 

OTOH if you see it as run a test build but don't generate object files...


-- 
Feb 03 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2643





------- Comment #2 from maxmo pochta.ru  2009-02-05 04:16 -------
 that's not a bug if you look at it a different way; -o- is to allow generating
 ddoc output without having to run everything.

not everything, just object file generation
 OTOH if you see it as run a test build but don't generate object files...

well then this feature should be better documented, because *some* semantic analysis is *done* with -o- switch. I suspect that this surprise only pops up when compiler tries to build class's vtbl at codegen step, which means that semantic analysis is not fully done at right time. I intensively use gcc -fsyntax-only and never run into trouble with it, in spite of the switch name, it seems like it does full semantic analysis. --
Feb 05 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2643





------- Comment #3 from shro8822 vandals.uidaho.edu  2009-02-05 11:58 -------
At some point I home that DMD will actual do more semantic stuff under -o- as
then I can get DDoc output for generated code. However even then DMD should
only do what is needed to generate the requested output.


-- 
Feb 05 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2643





------- Comment #4 from tomas famolsen.dk  2009-02-05 12:07 -------
DMD actually does quite a bit of error handling during code generation. I've
been hit by this several times in LDC, where it means that quite a lot of the
time, you can't be sure the AST you're generating code for is valid.

I would love to see this fixed as well, but I can also understand that some
errors are a lot simpler to detect at the codegen stage, so it worth the
performance tradeoff ?

I'm not sure.


-- 
Feb 05 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2643


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |robert octarineparrot.com


--- Comment #5 from yebblies <yebblies gmail.com> 2011-06-10 08:50:09 PDT ---
*** Issue 5947 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 10 2011