Jump to page: 1 2
Thread overview
[Issue 1963] New: -H creates broken headers
Mar 31, 2008
d-bugmail
Mar 31, 2008
d-bugmail
Apr 11, 2008
d-bugmail
Apr 11, 2008
d-bugmail
Jun 09, 2008
d-bugmail
Jun 09, 2008
d-bugmail
Jun 22, 2008
d-bugmail
Jun 23, 2008
d-bugmail
Jun 23, 2008
d-bugmail
Jun 23, 2008
d-bugmail
Dec 25, 2008
d-bugmail
March 31, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1963

           Summary: -H creates broken headers
           Product: D
           Version: 2.012
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: lindevel@gmx.net


-H creates broken headers like the attached one. It contains for example spurious "else" keywords.

/opt/dmd/include/phobos/std/stdio.d(111): found 'else' instead of statement
/opt/dmd/include/phobos/std/stdio.d(138): found 'else' instead of statement
/opt/dmd/include/phobos/std/stdio.d(295): found 'else' instead of statement
/opt/dmd/include/phobos/std/stdio.d(298): found 'else' instead of statement
/opt/dmd/include/phobos/std/stdio.d(340): found 'bool' when expecting ';'
following 'statement'
/opt/dmd/include/phobos/std/stdio.d(366): found 'else' instead of statement
/opt/dmd/include/phobos/std/stdio.d(374): found 'else' instead of statement


-- 

March 31, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1963





------- Comment #1 from lindevel@gmx.net  2008-03-31 17:56 -------
Created an attachment (id=240)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=240&action=view)
Example of broken header

PS: This header was generated like this: /var/tmp/portage/dev-lang/dmd-bin-2.012/work/dmd/bin/dmd -Istd/ -o- -c -H -Hfinclude/std/stdio.d std/stdio.d


-- 

April 11, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1963


chris@dprogramming.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chris@dprogramming.com
           Keywords|                            |rejects-valid




------- Comment #2 from chris@dprogramming.com  2008-04-11 10:52 -------
Small example of -H producing broken output, DMD 1.028:

template Foo(bool bar)
{
        void test()
        {
                static if(bar)
                { // Note the empty block.
                }
                else
                {
                }
        }
}

// -H output:

// D import file generated from 'H.d'
template Foo(bool bar)
{
void test()
{
static if(bar)
else

}
}


-- 

April 11, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1963





------- Comment #3 from chris@dprogramming.com  2008-04-11 11:18 -------
Found another problem with -H:

template Foo()
{
        void bar()
        {
        }
}

class Baz
{
        mixin Foo foo;

        alias foo.bar baz;
}

// -H output:

// D import file generated from 'H.d'
template Foo()
{
void bar()
{
}
}
class Baz
{
    mixin Foo!(); // Note: no mixin identifier foo as it should.
    alias foo.bar baz; // Now foo doesn't exist, error.
}


-- 

June 09, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1963


lindevel@gmx.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.012                       |2.014




------- Comment #4 from lindevel@gmx.net  2008-06-09 08:14 -------
Issue is still present in 2.0.14.


-- 

June 09, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1963


larsivar@igesund.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.014                       |2.012




------- Comment #5 from larsivar@igesund.net  2008-06-09 08:32 -------
Versions should stay at the earliest known.


-- 

June 22, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1963


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #6 from bugzilla@digitalmars.com  2008-06-22 18:54 -------
Fixed dmd 1.031 and 2.015


-- 

June 23, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1963





------- Comment #7 from lindevel@gmx.net  2008-06-23 02:48 -------
Created an attachment (id=259)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=259&action=view)
algorithm.d

Persists in 2.0.15, though in slightly different form.

To make this easier to check, you should include the version number of dmd which created the header file. Because of the recent Makefile changes, my fixes to bug #1940 did not apply anymore, which resulted in the system dmd being used to create the headers...


Compiling this sample:
---
import std.stdio;

void main(string[] args)
{
        writefln("Hello world!");
}
---

Creates this output:

/opt/dmd/include/phobos/std/stdio.d(368): found 'bool' when expecting ';'
following 'statement'
/opt/dmd/include/phobos/std/string.d(101): no identifier for declarator
manifest
/opt/dmd/include/phobos/std/string.d(101): semicolon expected, not 'dchar'
/opt/dmd/include/phobos/std/string.d(102): no identifier for declarator
manifest
/opt/dmd/include/phobos/std/string.d(102): semicolon expected, not 'dchar'
/opt/dmd/include/phobos/std/algorithm.d(86): no identifier for declarator
manifest
/opt/dmd/include/phobos/std/algorithm.d(86): semicolon expected, not 'uint'
/opt/dmd/include/phobos/std/algorithm.d(736): found '!=' when expecting ')'
/opt/dmd/include/phobos/std/algorithm.d(736): found ')' when expecting ';'
following 'statement'
/opt/dmd/include/phobos/std/algorithm.d(748): found 'else' instead of statement
/opt/dmd/include/phobos/std/algorithm.d(755): Declaration expected, not 'else'
/opt/dmd/include/phobos/std/algorithm.d(760): unrecognized declaration
/opt/dmd/include/phobos/std/c/stdlib.d(63): no identifier for declarator
manifest
/opt/dmd/include/phobos/std/c/stdlib.d(63): semicolon expected, not 'int'
/opt/dmd/include/phobos/std/c/stdlib.d(63): Error: identifier 'manifest' is not
defined
/opt/dmd/include/phobos/std/c/stdlib.d(63): Error: manifest is used as a type
/opt/dmd/include/phobos/std/c/stdlib.d(63): variable voids have no value
/opt/dmd/include/phobos/std/encoding.d(57): no identifier for declarator
manifest
/opt/dmd/include/phobos/std/encoding.d(57): semicolon expected, not 'dchar'
/opt/dmd/include/phobos/std/traits.d(607): no identifier for declarator
manifest
/opt/dmd/include/phobos/std/traits.d(607): semicolon expected, not 'byte'


-- 

June 23, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1963


lindevel@gmx.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




-- 

June 23, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1963





------- Comment #8 from lindevel@gmx.net  2008-06-23 02:51 -------
> Because of the recent Makefile changes, my fixes to bug #1940 did not apply anymore, which resulted in the system dmd being used to create the headers...
To make this clear: This does not mean that the attached header, or the header used to make dmd fail were generated by dmd 2.014. After fixing my patch, the headers are generated by 2.015 again, which creates that slightly different, but still incorrect, output.


-- 

« First   ‹ Prev
1 2