This list is closed, nobody may subscribe to it.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(371) |
Oct
(167) |
Nov
(412) |
Dec
(208) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(378) |
Feb
(302) |
Mar
(269) |
Apr
(296) |
May
(306) |
Jun
(381) |
Jul
(346) |
Aug
(315) |
Sep
(195) |
Oct
(216) |
Nov
(280) |
Dec
(227) |
| 2002 |
Jan
(309) |
Feb
(333) |
Mar
(328) |
Apr
(407) |
May
(517) |
Jun
(519) |
Jul
(400) |
Aug
(580) |
Sep
(1273) |
Oct
(984) |
Nov
(683) |
Dec
(538) |
| 2003 |
Jan
(578) |
Feb
(454) |
Mar
(312) |
Apr
(366) |
May
(505) |
Jun
(431) |
Jul
(415) |
Aug
(374) |
Sep
(470) |
Oct
(578) |
Nov
(372) |
Dec
(309) |
| 2004 |
Jan
(308) |
Feb
(247) |
Mar
(372) |
Apr
(413) |
May
(333) |
Jun
(323) |
Jul
(269) |
Aug
(239) |
Sep
(469) |
Oct
(383) |
Nov
(400) |
Dec
(332) |
| 2005 |
Jan
(411) |
Feb
(363) |
Mar
(346) |
Apr
(316) |
May
(275) |
Jun
(248) |
Jul
(396) |
Aug
(396) |
Sep
(279) |
Oct
(340) |
Nov
(319) |
Dec
(218) |
| 2006 |
Jan
(317) |
Feb
(263) |
Mar
(304) |
Apr
(296) |
May
(209) |
Jun
(349) |
Jul
(246) |
Aug
(198) |
Sep
(174) |
Oct
(138) |
Nov
(201) |
Dec
(270) |
| 2007 |
Jan
(223) |
Feb
(182) |
Mar
(350) |
Apr
(350) |
May
(259) |
Jun
(221) |
Jul
(299) |
Aug
(465) |
Sep
(356) |
Oct
(265) |
Nov
(417) |
Dec
(225) |
| 2008 |
Jan
(421) |
Feb
(327) |
Mar
(219) |
Apr
(389) |
May
(375) |
Jun
(262) |
Jul
(215) |
Aug
(289) |
Sep
(257) |
Oct
(383) |
Nov
(237) |
Dec
(209) |
| 2009 |
Jan
(232) |
Feb
(327) |
Mar
(306) |
Apr
(251) |
May
(146) |
Jun
(247) |
Jul
(302) |
Aug
(252) |
Sep
(263) |
Oct
(376) |
Nov
(270) |
Dec
(244) |
| 2010 |
Jan
(225) |
Feb
(184) |
Mar
(300) |
Apr
(290) |
May
(275) |
Jun
(535) |
Jul
(192) |
Aug
(237) |
Sep
(304) |
Oct
(142) |
Nov
(384) |
Dec
(186) |
| 2011 |
Jan
(305) |
Feb
(337) |
Mar
(331) |
Apr
(318) |
May
(306) |
Jun
(299) |
Jul
(205) |
Aug
(271) |
Sep
(232) |
Oct
(179) |
Nov
(252) |
Dec
(216) |
| 2012 |
Jan
(195) |
Feb
(268) |
Mar
(142) |
Apr
(226) |
May
(203) |
Jun
(132) |
Jul
(211) |
Aug
(429) |
Sep
(289) |
Oct
(291) |
Nov
(182) |
Dec
(188) |
| 2013 |
Jan
(205) |
Feb
(259) |
Mar
(224) |
Apr
(125) |
May
(295) |
Jun
(181) |
Jul
(209) |
Aug
(167) |
Sep
(330) |
Oct
(212) |
Nov
(95) |
Dec
(114) |
| 2014 |
Jan
(40) |
Feb
(63) |
Mar
(62) |
Apr
(65) |
May
(82) |
Jun
(105) |
Jul
(56) |
Aug
(175) |
Sep
(79) |
Oct
(49) |
Nov
(51) |
Dec
(47) |
| 2015 |
Jan
(26) |
Feb
(69) |
Mar
(82) |
Apr
(55) |
May
(35) |
Jun
(57) |
Jul
(54) |
Aug
(56) |
Sep
(25) |
Oct
(21) |
Nov
(8) |
Dec
(27) |
| 2016 |
Jan
(49) |
Feb
(44) |
Mar
(132) |
Apr
(39) |
May
(39) |
Jun
(49) |
Jul
(70) |
Aug
(43) |
Sep
(69) |
Oct
(79) |
Nov
(65) |
Dec
(32) |
| 2017 |
Jan
(99) |
Feb
(88) |
Mar
(42) |
Apr
(47) |
May
(56) |
Jun
|
Jul
(79) |
Aug
(9) |
Sep
(29) |
Oct
(4) |
Nov
|
Dec
(12) |
| 2018 |
Jan
(45) |
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
(14) |
2
(10) |
3
(4) |
4
(2) |
5
(1) |
6
(5) |
|
7
|
8
(9) |
9
(6) |
10
(2) |
11
(3) |
12
(10) |
13
|
|
14
|
15
(10) |
16
(5) |
17
(14) |
18
|
19
(1) |
20
(3) |
|
21
(1) |
22
(2) |
23
(2) |
24
(16) |
25
(2) |
26
(2) |
27
|
|
28
|
29
|
30
(1) |
|
|
|
|
|
From: BGINFO4X <bgi...@kz...> - 2013-04-30 21:07:58
|
2013/4/25 Алексей Павлов <al...@gm...>:
> Try download again. I think you have corrupted download
Hi, It was the old 7-zip version. The last one uncompress the files ok.
After testing BGINFO4X in MSYS2 what I can say is:
1- Accents, diacritics, ... are supported in USERNAME. The
/home/$USERNAME is created correctly.
2- echo "cäsà" > out.txt, generates an out.txt with a correct output ("cäsà").
3- Control-C is not trapped. The program exits immediately.
4- The bash builtin "pwd -W" doesn't work. "So the program stops here".
Tell me if you need more information of 3, 4.
Do you know when a MSYS 2 version will be ready? Is there any time frame?
Thanks a lot.
|
|
From: Eli Z. <el...@gn...> - 2013-04-26 21:00:53
|
> Date: Fri, 26 Apr 2013 13:51:25 -0400 > From: Andrew Pennebaker <and...@gm...> > > Can we get a newer version of grep, with convenience features like > --exclude-from=.grepignore? > > http://git.savannah.gnu.org/cgit/grep.git/plain/NEWS MSYS Grep or MinGW Grep? A MinGW build of Grep 2.10 (which supports '--exclude-from') can be found here: http://sourceforge.net/projects/ezwinports/files/grep-2.10-w32-bin.zip/download |
|
From: Andrew P. <and...@gm...> - 2013-04-26 17:51:35
|
Can we get a newer version of grep, with convenience features like --exclude-from=.grepignore? http://git.savannah.gnu.org/cgit/grep.git/plain/NEWS -- Cheers, Andrew Pennebaker www.yellosoft.us |
|
From: Алексей П. <al...@gm...> - 2013-04-25 10:03:49
|
Try download again. I think you have corrupted download 2013/4/25 BGINFO4X <bgi...@kz...> > > I'm on business trip now but I upload my last version of MSYS2. > > You can download my last work from > https://sourceforge.net/projects/lexx83.u/files > > I have downloaded the x86 build and the x64 build. I get errors when > decompressing. All the files are 0 KB. > > One question, this build is compiled or not? > If it is not compiled, it will be too difficult for me to compile now: > I don't have the knowledge and the time ... > > Thanks a lot. > Regards. > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr > _______________________________________________ > MinGW-users mailing list > Min...@li... > > This list observes the Etiquette found at > http://www.mingw.org/Mailing_Lists. > We ask that you be polite and do the same. Disregard for the list > etiquette may cause your account to be moderated. > > _______________________________________________ > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > Also: mailto:min...@li...?subject=unsubscribe > |
|
From: BGINFO4X <bgi...@kz...> - 2013-04-25 08:37:25
|
> I'm on business trip now but I upload my last version of MSYS2. > You can download my last work from https://sourceforge.net/projects/lexx83.u/files I have downloaded the x86 build and the x64 build. I get errors when decompressing. All the files are 0 KB. One question, this build is compiled or not? If it is not compiled, it will be too difficult for me to compile now: I don't have the knowledge and the time ... Thanks a lot. Regards. |
|
From: Eli Z. <el...@gn...> - 2013-04-24 19:17:14
|
> Date: Wed, 24 Apr 2013 13:25:39 -0500 > From: Pete Klemm <pet...@es...> > > I find a large number of files with the name 'makexxxxx-xx.bat' in the > folder > C:\Users\pklemm\AppData\Local\Temp and I have excluded them from my > scans. I believe those are left over from 'mingw-make'. Not sure why it does > not clean up after itself. Probably because your anti-virus is still holding an open handle on those temporary batch files by the time Make wants to delete them. So the deletion fails. > I am curious if there are other temporary files that doe get cleaned up that > I should also add to my exclusions list. Look in directories pointed to by TEMP, TMP, and TMPDIR environment variables, if any of these are defined (at least one should be). Also, look in C:\WINDOWS\Temp. If you have other users defined on that machine, look in their TEMP/TMP as well. |
|
From: Pete K. <pet...@es...> - 2013-04-24 18:38:29
|
Hi Earnie, On 4/24/2013 1:13 PM, Earnie Boyd wrote: > On Wed, Apr 24, 2013 at 2:07 PM, Pete Klemm <pet...@es...> wrote: >> My anti-virus scanner (Kaspersky Internet Security)is making my builds >> take forever. >> >> I believe this is due to a large number of temporary >> files. >> >> Where and by what names does MinGW create temporary >> files, so I can exclude them from my anti-virus scanner. > Usually in the working directory for the build. This is especially > true if you're using configure. Can you configure your AV to ignore > your working directory? > I find a large number of files with the name 'makexxxxx-xx.bat' in the folder C:\Users\pklemm\AppData\Local\Temp and I have excluded them from my scans. I believe those are left over from 'mingw-make'. Not sure why it does not clean up after itself. I am curious if there are other temporary files that doe get cleaned up that I should also add to my exclusions list. |
|
From: Earnie B. <ea...@us...> - 2013-04-24 18:13:24
|
On Wed, Apr 24, 2013 at 2:07 PM, Pete Klemm <pet...@es...> wrote: > My anti-virus scanner (Kaspersky Internet Security)is making my builds > take forever. > > I believe this is due to a large number of temporary > files. > > Where and by what names does MinGW create temporary > files, so I can exclude them from my anti-virus scanner. Usually in the working directory for the build. This is especially true if you're using configure. Can you configure your AV to ignore your working directory? -- Earnie -- https://sites.google.com/site/earnieboyd |
|
From: Pete K. <pet...@es...> - 2013-04-24 18:07:54
|
My anti-virus scanner (Kaspersky Internet Security)is making my builds take forever. I believe this is due to a large number of temporary files. Where and by what names does MinGW create temporary files, so I can exclude them from my anti-virus scanner. Pete |
|
From: K. F. <kfr...@gm...> - 2013-04-24 17:49:22
|
Hello Jay! On Wed, Apr 24, 2013 at 9:11 AM, JAY <> wrote: > Joaquín Ferruz Melero <ferruz@...> writes: > >> >> El 24/04/2013 12:17, JAY escribió: >> > I use C. Following are some steps in my code: >> > 1. I declare a 2-dimensional array A[x][y]. >> > 2. I pass this array to a function F(int A[x][y]) >> > 3. Within the F i declare another array B[x][y] >> > 4. I perform some operations on B >> > 5. Then I change the address of A:-&a to that of B's:-&b (A=B). >> > >> > Problem: The address of A remains to be &b until the program returns > from F. >> > As soon as F returns the address of A is change from &b to &a. >> The "A" argument is a variable internal to the function is >> created as F is called, can be changed inside it and will disappear when >> F returns; it is a pointer to a row of the matrix. However, the "A" >> external to the function remains unchanged. Remember that arguments are >> passed by value in C. >> >> In addition the B array is (I guess) a local automatic >> variable created on the stack. If this is the case, it makes no sense to >> return a pointer to that, because it will cease to exist with F. You >> could try to a) reserve memory for B with malloc inside the function b) >> fill the matrix as required c) return the pointer as the result of the >> function (of course without freeing it). >> >> Regards, >> >> JFM > > Thanks JFM, I now realize my mistake. I always knew that arguments are > passed by value in C; but i always used pointers to pass them by reference; > but in doing so I forgot that the pointers themselves are passed by value. > > I now realize that the argument A(an array A[x][y]) that i passed to > function F is different from parameter A of function F; though they both are > pointing to the same address. So when I changed the address of parameter A > from &a to &b (expression: A=B) the address of argument A still remains to > be &a, which still resides on the stack and will be popped when F returns. > > So now I have a problem: > 1. I want to pass the array A[x][y] to the function F(int A[x][y]) > 2. In F i want to do some operations on A, but while doing so i should not > disturb the elements of A since the new value of each element of A is > dependent on its previous value as well as the previous values of its > neighboring element. So i declare another array B[x][y] and operate on > elements of B in accordance with the same element in A as well as its > neighboring element. > 3.So at the end of the operations I want to assign B to A, so i assign the > address of B:- &b to A(by: A=B). But as noticed before, this will mean > nothing when the function F returns. > > So now I want a solution to this.I suppose there is none, because: > 1. you cannot return arrays from F > 2. you cannot return any kind of pointer(int,void etc.), because when try to > assign that pointer to A a type mismatch error will occur since A is array > type > 3. you cannot type cast to arrays > 4. you cannot declare a global(File scope) variable length array. > > At present I: within F wrote a loop which assigns each element of B to A; > but this consumes CPU time. So if someone can think of a solution it will be > very helpful. I don't think there is any way for you to avoid the copy back to A (or something similar) (unless there is some special structure in the details of A and / or your calculations that could be taken advantage of). I would look at it this way: Goal of calling F(A): Modify A according to some calculations. This is the interface -- what your function does, as visible to the outside world. How you do it: Because of the structure of your calculations, you need some scratch space -- the B you define inside of F. This is implementation. The outside world neither knows nor cares what happens inside of F -- it just wants to get A modified. If you can't rejigger your calculations somehow to work on A in place, then you need your scratch space, and you need to copy your results back to A. What you can do -- and this may not actually save you anything, or the savings may be irrelevant -- if you're willing to modify the interface of F is have F return "access" to its scratch space, rather than modifying A. The two common ways of doing this are to have the calling code pass in both A and a (pointer to a) second (uninitialized) matrix, say C, that will be used both as the scratch space and to return the result. (In this scheme, F doesn't have an internal matrix B; it just uses C). Here you save the cost of the copy C-->A (unless, of course, the calling code just turns around and copies C to A). The second approach would be to have F allocate the scratch / result space on the heap, and return a pointer to the allocated space to the calling code. Now you introduce a memory management issue, and the calling code has to take the responsibility for releasing the allocated space when it's done with it. (In another approach -- that I don't recommend -- B can use a static variable B and return a pointer to B, or, similarly, the calling code and F can agree to use a static global variable as the scratch / result space. The obvious issue is that the next time you call F, the old result gets overwritten.) My recommendation: If you like the semantics of having F modify A, and the cost of copying back to A is not significant in context, then use a local matrix B (on the stack) or allocate B as a matrix on the heap, do your calculations, and copy back to A. If the cost of the copy is an issue, I find having the calling code be responsible for passing in both the argument, A, and the result / scratch space, called C, above, is a straightforward and time-tested approach. > Thanks > Jay. Good luck. K. Frank |
|
From: Otto H. <ott...@gm...> - 2013-04-24 17:26:55
|
Thanks, Eli, running mingw-get install g++-bin solved the c++ compilation issue. And thanks, Earnie, including <stdio.h> resolved the warning in helloworld. -- This message is sarcasm free<http://faculty.chicagobooth.edu/nicholas.epley/epleykruger.pdf>. |
|
From: Earnie B. <ea...@us...> - 2013-04-24 16:45:14
|
On Wed, Apr 24, 2013 at 10:11 AM, Ulf Karlsson wrote: > Hello, > > I have a problem with linkage of weak symbols. I have a testcase where I > define a weak symbol in module.c, and refer to it from main.c, and then I > (optionally) want to override it with a definition in cb.c: http://bit.ly/ZORMaw -- Earnie -- https://sites.google.com/site/earnieboyd |
|
From: Jared M. <abs...@gm...> - 2013-04-24 16:33:05
|
> Date: Wed, 24 Apr 2013 13:11:38 +0000 (UTC) > From: JAY <jay...@ya...> > Subject: Re: [Mingw-users] Unexpected behavior of the compiler. > To: min...@li... > Message-ID: <loo...@po...> > Content-Type: text/plain; charset=utf-8 > > So now I want a solution to this. I suppose there is none, because: > 1. you cannot return arrays from F > 2. you cannot return any kind of pointer(int,void etc.), because when try to > assign that pointer to A a type mismatch error will occur since A is array > type > 3. you cannot type cast to arrays > 4. you cannot declare a global(File scope) variable length array. > > At present I: within F wrote a loop which assigns each element of B to A; > but this consumes CPU time. So if someone can think of a solution it will be > very helpful. > > Thanks > Jay. > Your choice is to either: 1) Run the calculations in a macro, or switch to C++ and calculate them in a template, so they'll be executed at compile-time; I've actually seen some example code that implements Pong or something at compile time in C++ 2) Run the calculations in a function at run-time, thereby spending CPU time on the calculations every time. These are the two choices. One way or another, you'll be spending CPU time on the calculations. If you can do the calculations at compile-time, then you should be able to shoe-horn them into an abomination of a macro, but if you can't then you'll have to execute them at run-time. If you can do them at compile-time then you can also set the array at compile-time. However, if you can't (let's say that you build the array from user data) then you will HAVE TO spend CPU time to copy the array, because that's just how C works. Note: technically you can create a variable named a_ that's a double-pointer, set it to point to A, and pass a pointer to a_ into the function, where malloc() is used to allocate B, but this might slow down your calculations instead of speeding them up. |
|
From: Greg C. <gch...@sb...> - 2013-04-24 15:47:13
|
On 2013-04-24 14:28Z, Kimesh Patel wrote: > > I am compiling a DLL in Msys-MinGW using g++-4.7.2. I am loading it using > LoadLibrary() and it loads fine. But when I tried to call a function in it > (i.e. using GetProcAddr() ). It fails with 'Access Violation' error and > shows libstdc++-6.dll as fault module. http://sscce.org/ |
|
From: Kimesh P. <kim...@gm...> - 2013-04-24 14:28:39
|
Hi, I am compiling a DLL in Msys-MinGW using g++-4.7.2. I am loading it using LoadLibrary() and it loads fine. But when I tried to call a function in it (i.e. using GetProcAddr() ). It fails with 'Access Violation' error and shows libstdc++-6.dll as fault module. I also compiled it in cygwin. It works fine with it. Any help is appriciated. Thanks in advance. Cheers, Kimesh |
|
From: Ulf K. <kar...@gm...> - 2013-04-24 14:11:50
|
Hello,
I have a problem with linkage of weak symbols. I have a testcase where I
define a weak symbol in module.c, and refer to it from main.c, and then I
(optionally) want to override it with a definition in cb.c:
$ cat main.c
#include <stdio.h>
extern unsigned int x;
void module_print_x();
int main()
{
printf("x %x\n", x);
module_print_x();
return 0;
}
$ cat module.c
#include <stdio.h>
unsigned int __attribute__ ((weak)) x = 0xdeadbeef;
int module_print_x()
{
printf("module x: %x\n", x);
return 0;
}
$ cat cb.c
unsigned int x = 0xbeefdead;
$ cat make.sh
CFLAGS="-Wall"
# GCC=/c/MinGW_4.8/mingw64/bin/gcc
GCC=gcc
${GCC} ${CFLAGS} -c module.c
${GCC} ${CFLAGS} -c main.c
${GCC} ${CFLAGS} -c cb.c -o cb.o
${GCC} ${CFLAGS} -o main module.o main.o
${GCC} ${CFLAGS} -o main-cb-ovrd module.o main.o cb.o
In Linux I receive the expected output:
$ ./main
x deadbeef
module x: deadbeef
$ ./main-cb-ovrd
x beefdead
module x: beefdead
On Windows I get a link error while trying to link main (without the strong
symbol in cb.o):
$ sh -x make.sh
+ CFLAGS=-Wall
+ GCC=gcc
+ gcc -Wall -c module.c
+ gcc -Wall -c main.c
+ gcc -Wall -c cb.c -o cb.o
+ gcc -Wall -o main module.o main.o
module.o:module.c:(.text+0xb): undefined reference to `x'
main.o:main.c:(.text+0xf): undefined reference to `x'
collect2.exe: error: ld returned 1 exit status
+ gcc -Wall -o main-cb-ovrd module.o main.o cb.o
Looking at the files with nm I see the following:
$ nm cb.o
0000000000000000 b .bss
0000000000000000 d .data
0000000000000000 t .text
0000000000000000 D x
$ nm module.o
0000000000000000 b .bss
0000000000000000 d .data
0000000000000000 T module_print_x
0000000000000000 p .pdata
U printf
0000000000000000 r .rdata
0000000000000000 t .text
0000000000000000 D .weak.x.module_print_x
w x
0000000000000000 r .xdata
$ nm main.o
0000000000000000 b .bss
0000000000000000 d .data
0000000000000000 T main
U __main
U module_print_x
0000000000000000 p .pdata
U printf
0000000000000000 r .rdata
0000000000000000 t .text
U x
0000000000000000 r .xdata
I have tried with various versions of MinGW including GCC 4.8.0 with
Binutils 2.23.2 and I get similar errors.
Any help would be appreciated!
Kind regards,
Ulf
|
|
From: JAY <jay...@ya...> - 2013-04-24 13:12:00
|
Joaquín Ferruz Melero <ferruz@...> writes: > > El 24/04/2013 12:17, JAY escribió: > > I use C. Following are some steps in my code: > > 1. I declare a 2-dimensional array A[x][y]. > > 2. I pass this array to a function F(int A[x][y]) > > 3. Within the F i declare another array B[x][y] > > 4. I perform some operations on B > > 5. Then I change the address of A:-&a to that of B's:-&b (A=B). > > > > Problem: The address of A remains to be &b until the program returns from F. > > As soon as F returns the address of A is change from &b to &a. > The "A" argument is a variable internal to the function is > created as F is called, can be changed inside it and will disappear when > F returns; it is a pointer to a row of the matrix. However, the "A" > external to the function remains unchanged. Remember that arguments are > passed by value in C. > > In addition the B array is (I guess) a local automatic > variable created on the stack. If this is the case, it makes no sense to > return a pointer to that, because it will cease to exist with F. You > could try to a) reserve memory for B with malloc inside the function b) > fill the matrix as required c) return the pointer as the result of the > function (of course without freeing it). > > Regards, > > JFM Thanks JFM, I now realize my mistake. I always knew that arguments are passed by value in C; but i always used pointers to pass them by reference; but in doing so I forgot that the pointers themselves are passed by value. I now realize that the argument A(an array A[x][y]) that i passed to function F is different from parameter A of function F; though they both are pointing to the same address. So when I changed the address of parameter A from &a to &b (expression: A=B) the address of argument A still remains to be &a, which still resides on the stack and will be popped when F returns. So now I have a problem: 1. I want to pass the array A[x][y] to the function F(int A[x][y]) 2. In F i want to do some operations on A, but while doing so i should not disturb the elements of A since the new value of each element of A is dependent on its previous value as well as the previous values of its neighboring element. So i declare another array B[x][y] and operate on elements of B in accordance with the same element in A as well as its neighboring element. 3.So at the end of the operations I want to assign B to A, so i assign the address of B:- &b to A(by: A=B). But as noticed before, this will mean nothing when the function F returns. So now I want a solution to this.I suppose there is none, because: 1. you cannot return arrays from F 2. you cannot return any kind of pointer(int,void etc.), because when try to assign that pointer to A a type mismatch error will occur since A is array type 3. you cannot type cast to arrays 4. you cannot declare a global(File scope) variable length array. At present I: within F wrote a loop which assigns each element of B to A; but this consumes CPU time. So if someone can think of a solution it will be very helpful. Thanks Jay. > > What I expected(and want): address of A will remain &b even after F returns. > > > > Is, what i want, possible ? If not, please suggest some walk-arounds I could > > use. One walk-around I am using at present is copying each element of B to A. > > > > Thanks & Regards > > Jay |
|
From: Joaquín F. M. <fe...@ca...> - 2013-04-24 11:13:29
|
El 24/04/2013 12:17, JAY escribió:
> I use C. Following are some steps in my code:
> 1. I declare a 2-dimensional array A[x][y].
> 2. I pass this array to a function F(int A[x][y])
> 3. Within the F i declare another array B[x][y]
> 4. I perform some operations on B
> 5. Then I change the address of A:-&a to that of B's:-&b (A=B).
>
> Problem: The address of A remains to be &b until the program returns from F.
> As soon as F returns the address of A is change from &b to &a.
The "A" argument is a variable internal to the function is
created as F is called, can be changed inside it and will disappear when
F returns; it is a pointer to a row of the matrix. However, the "A"
external to the function remains unchanged. Remember that arguments are
passed by value in C.
In addition the B array is (I guess) a local automatic
variable created on the stack. If this is the case, it makes no sense to
return a pointer to that, because it will cease to exist with F. You
could try to a) reserve memory for B with malloc inside the function b)
fill the matrix as required c) return the pointer as the result of the
function (of course without freeing it).
Regards,
JFM
> What I expected(and want): address of A will remain &b even after F returns.
>
> Is, what i want, possible ? If not, please suggest some walk-arounds I could
> use. One walk-around I am using at present is copying each element of B to A.
>
> Thanks & Regards
> Jay
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> MinGW-users mailing list
> Min...@li...
>
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.
>
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
> Also: mailto:min...@li...?subject=unsubscribe
>
|
|
From: JonY <jo...@us...> - 2013-04-24 10:36:22
|
On 4/24/2013 18:17, JAY wrote: > I use C. Following are some steps in my code: > 1. I declare a 2-dimensional array A[x][y]. > 2. I pass this array to a function F(int A[x][y]) > 3. Within the F i declare another array B[x][y] > 4. I perform some operations on B > 5. Then I change the address of A:-&a to that of B's:-&b (A=B). > > Problem: The address of A remains to be &b until the program returns from F. > As soon as F returns the address of A is change from &b to &a. > > What I expected(and want): address of A will remain &b even after F returns. > > Is, what i want, possible ? If not, please suggest some walk-arounds I could > use. One walk-around I am using at present is copying each element of B to A. > Please provide a minimal test case to demonstrate instead of giving a description. |
|
From: JAY <jay...@ya...> - 2013-04-24 10:18:02
|
I use C. Following are some steps in my code: 1. I declare a 2-dimensional array A[x][y]. 2. I pass this array to a function F(int A[x][y]) 3. Within the F i declare another array B[x][y] 4. I perform some operations on B 5. Then I change the address of A:-&a to that of B's:-&b (A=B). Problem: The address of A remains to be &b until the program returns from F. As soon as F returns the address of A is change from &b to &a. What I expected(and want): address of A will remain &b even after F returns. Is, what i want, possible ? If not, please suggest some walk-arounds I could use. One walk-around I am using at present is copying each element of B to A. Thanks & Regards Jay |
|
From: Renato S. <br....@gm...> - 2013-04-24 02:23:36
|
2013/4/20 Алексей Павлов <al...@gm...> > 2013/4/20 Renato Silva <br....@gm...> > >> Will MSYS2 address this bug? http://sourceforge.net/p/mingw/bugs/1676. >> >> This testcase doesn't work on MSYS2 > What is the problem exactly? |
|
From: Earnie B. <ea...@us...> - 2013-04-23 22:43:40
|
On Tue, Apr 23, 2013 at 4:23 PM, George Koehler wrote: > I tested the rc-2 packages of mingwrt and w32api. I have no problems: > everything that worked with the old mingwrt and w32api seems to work > with rc-2. > Glad to hear it works for you. > I did notice one minor detail. In /mingw/include/_mingw.h it says > > #if (__GNUC__ < 3 || !defined(__GNUC_MINOR__) || (__GNUC__ == 3 && > __GNUC_MINOR__ < 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4 && > __GNUC_PATCHLEVEL__ < 5)) > #error ERROR: You must use a GNU Compiler version >= 3.4.5. > #endif > > That __GNUC_MINOR__ >= 4 should perhaps be __GNUC_MINOR__ == 4. Right > now a hypothetical gcc 3.5.0 would give the error message. Of course, > there is no gcc 3.5.x (as 4.0.x came after 3.4.x), so there is not > really any problem. I raised https://sourceforge.net/p/mingw/bugs/1958/ to track it. -- Earnie -- https://sites.google.com/site/earnieboyd |
|
From: George K. <xke...@ne...> - 2013-04-23 20:54:04
|
I tested the rc-2 packages of mingwrt and w32api. I have no problems: everything that worked with the old mingwrt and w32api seems to work with rc-2. I did notice one minor detail. In /mingw/include/_mingw.h it says #if (__GNUC__ < 3 || !defined(__GNUC_MINOR__) || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4 && __GNUC_PATCHLEVEL__ < 5)) #error ERROR: You must use a GNU Compiler version >= 3.4.5. #endif That __GNUC_MINOR__ >= 4 should perhaps be __GNUC_MINOR__ == 4. Right now a hypothetical gcc 3.5.0 would give the error message. Of course, there is no gcc 3.5.x (as 4.0.x came after 3.4.x), so there is not really any problem. --George Koehler |
|
From: Earnie B. <ea...@us...> - 2013-04-22 12:01:38
|
On Sun, Apr 21, 2013 at 10:53 PM, Eli Zaretskii wrote: >> From: Otto Hunt >> Date: Sun, 21 Apr 2013 15:56:26 -0700 >> >> So compilation should work (my previous error was typing g++). When I >> navigate to c:\cfiles\ (where I have chosen to store my source code) then >> enter "gcc helloworld.cpp -o helloworld.exe " I get a new error: >> >> gcc: error: CreateProcess: No such file or directory >> >> But when I change the .cpp to .c, it will compile, with a warning: > > That means you didn't install the C++ compiler distribution. When gcc > sees a C++ file, such as helloworld.cpp, it wants to invoke > cc1plus.exe, the C++ compiler. And it evidently doesn't find it. And to get rid of the warning you need to include stdio.h. -- Earnie -- https://sites.google.com/site/earnieboyd |
|
From: Eli Z. <el...@gn...> - 2013-04-22 02:53:34
|
> From: Otto Hunt <ott...@gm...> > Date: Sun, 21 Apr 2013 15:56:26 -0700 > > So compilation should work (my previous error was typing g++). When I > navigate to c:\cfiles\ (where I have chosen to store my source code) then > enter "gcc helloworld.cpp -o helloworld.exe " I get a new error: > > gcc: error: CreateProcess: No such file or directory > > But when I change the .cpp to .c, it will compile, with a warning: That means you didn't install the C++ compiler distribution. When gcc sees a C++ file, such as helloworld.cpp, it wants to invoke cc1plus.exe, the C++ compiler. And it evidently doesn't find it. |