[Issue 7322] Taking address of deprecated functions isn't refused

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7322

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P2  |P3

--


[Issue 7322] Taking address of deprecated functions isn't refused

2015-06-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7322

Kenji Hara  changed:

   What|Removed |Added

 CC||v-domrac...@ya.ru

--- Comment #10 from Kenji Hara  ---
*** Issue 14559 has been marked as a duplicate of this issue. ***

--


[Issue 7322] Taking address of deprecated functions isn't refused

2013-07-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7322


Kenji Hara  changed:

   What|Removed |Added

   Keywords||pull


--- Comment #9 from Kenji Hara  2013-07-04 07:36:18 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2130

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


[Issue 7322] Taking address of deprecated functions isn't refused

2012-07-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7322



--- Comment #8 from edmcc...@verizon.net 2012-07-27 20:34:11 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1064

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


[Issue 7322] Taking address of deprecated functions isn't refused

2012-07-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7322



--- Comment #7 from Kenji Hara  2012-07-19 09:37:43 PDT ---
(In reply to comment #6)
> The deprecation check needs to be done where the overload set is resolved,
> wherever that is.

DotVarExp and VarExp have `hasOverloads` field that means whether the
overloaded symbol is really resolved or not.
In these cases, CastExp::semantic and AddrExp::implicitConvTo might be better
places.

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


[Issue 7322] Taking address of deprecated functions isn't refused

2012-07-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7322


yebblies  changed:

   What|Removed |Added

   Keywords|pull|
 AssignedTo|yebbl...@gmail.com  |nob...@puremagic.com


--- Comment #6 from yebblies  2012-07-20 02:27:42 EST ---
The deprecation check needs to be done where the overload set is resolved,
wherever that is.

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


[Issue 7322] Taking address of deprecated functions isn't refused

2012-07-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7322



--- Comment #5 from github-bugzi...@puremagic.com 2012-07-19 09:00:18 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/bdb1f13fa9124a56dda0b36697b394e890758241
Revert "Merge pull request #670 from yebblies/issue7322"

This reverts commit d5dc77452b7f6d0c0768bf33ff3f8172fc0cc482, reversing
changes made to 00778d310b6980ac7068398f4dac22aa4860b8d4.

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


[Issue 7322] Taking address of deprecated functions isn't refused

2012-07-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7322



--- Comment #4 from Kenji Hara  2012-07-19 08:57:10 PDT ---
(In reply to comment #3)
> If foo(int) instead of foo(float) is deprecated, then an error is issued even
> though it should be possible to take the address of the undeprecated function.
> 
> (I've been having similar problems trying to fix issue 144; in these
> situtations, I think AddrExp::semantic is too early in the compilation process
> for applying fixes that may be affected by overload resolution.)

An example that accidentally rejected with current git head:

deprecated int foo(float a) { return 1; }
int foo(int a) { return 0; }

void main()
{
int function(float) fp1 = &foo;
// test.d(10): Error: function test.foo is deprecated  <- Bad!
}

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


[Issue 7322] Taking address of deprecated functions isn't refused

2012-07-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7322


edmcc...@verizon.net changed:

   What|Removed |Added

 CC||edmcc...@verizon.net


--- Comment #3 from edmcc...@verizon.net 2012-07-18 17:44:07 PDT ---
(In reply to comment #2)

The fix from pull #670 gets confused when there are "undeprecated" overloads;
for example, here are several ways that a deprecated function can still be
called through a function pointer:

int foo(int a) { return 0; }
deprecated int foo(float a) { return 1; }

void main()
{
int function(float) fp1 = &foo;
auto fp2 = cast(int function(float))&foo;
assert(fp1(0.0) == 1);
assert(fp2(0.0) == 1);
}


If foo(int) instead of foo(float) is deprecated, then an error is issued even
though it should be possible to take the address of the undeprecated function.

(I've been having similar problems trying to fix issue 144; in these
situtations, I think AddrExp::semantic is too early in the compilation process
for applying fixes that may be affected by overload resolution.)

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


[Issue 7322] Taking address of deprecated functions isn't refused

2012-07-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7322



--- Comment #2 from github-bugzi...@puremagic.com 2012-07-17 00:09:11 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/27134abfb05ef9218e8d6139fe29219b2be4902b
Issue 7322 - Taking address of deprecated functions isn't refused

AddrExp::semantic is missing a check when e1 is a VarExp.

https://github.com/D-Programming-Language/dmd/commit/d5dc77452b7f6d0c0768bf33ff3f8172fc0cc482
Merge pull request #670 from yebblies/issue7322

Issue 7322 - Taking address of deprecated functions isn't refused

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


[Issue 7322] Taking address of deprecated functions isn't refused

2012-01-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7322


yebblies  changed:

   What|Removed |Added

   Keywords||patch
 CC||yebbl...@gmail.com
   Platform|x86 |All
 AssignedTo|nob...@puremagic.com|yebbl...@gmail.com
 OS/Version|Windows |All


--- Comment #1 from yebblies  2012-02-01 15:00:40 EST ---
https://github.com/D-Programming-Language/dmd/pull/670

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