www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 996] New: Error in doc on implicit conversion between pointer and array

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

           Summary: Error in doc on implicit conversion between pointer and
                    array
           Product: D
           Version: 1.007
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: henrik harmsen.se


In the documentation on arrays, under "usage" is mentioned this sequence:

int* p;
int[3] s;
p = s;          // p points to the first element of the array s.

However, this causes the following message from the compiler:
"cannot implicitly convert expression (s) of type int[3] to int*."

It seems the documentation needs to be updated. I only stumbled on one of the
cases (the above) but there might be more cases that need revisit.


-- 
Feb 22 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=996


gide nwawudu.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://www.digitalmars.com/d
                   |                            |/2.0/arrays.html





Added URL: http://www.digitalmars.com/d/2.0/arrays.html.


-- 
Apr 17 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=996






Bug was reported for version 1.007, but it still exists in 2.012.


-- 
Apr 25 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=996


smjg iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg iname.com
                URL|http://www.digitalmars.com/d|http://www.digitalmars.com/d
                   |/2.0/arrays.html            |/1.0/arrays.html
          Component|DMD                         |www.digitalmars.com
           Keywords|                            |rejects-valid
         OS/Version|Linux                       |All
           Platform|PC                          |All





This bug is filed against a D1 version, so surely the URL given should be to
the D1 docs.  Also correcting platform and component.


-- 
Mar 06 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=996


Christian Kamm <kamm-removethis incasoftware.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |kamm-removethis incasoftwar
                   |                            |e.de





2009-06-30 10:42:53 PDT ---
Marking with patch, since this fix is trivial:

change

p = q;
p = s;
p = a;

to

p = q;
p = s.ptr;
p = a.ptr;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 30 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=996


Sobirari Muhomori <maxmo pochta.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|patch                       |





PDT ---
ha-ha, the patch keyword is for bugs that have patch fixing them

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 02 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=996


Christian Kamm <kamm-removethis incasoftware.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch





2009-07-02 02:46:42 PDT ---
I honestly think it'd take longer for Walter to look at, download and apply a
'real patch' than for him to open arrays.dd and add the .ptr to lines 148/149
manually.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 02 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=996






PDT ---
The same bug is in the string section: "A pointer to a char can be generated".

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 02 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=996


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |FIXED



Fixed in phobos commit 1663. Don't know how this one stuck around for so long.

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