[Bug c++/59598] New: very simple code using file open for read

2013-12-25 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59598

Bug ID: 59598
   Summary: very simple code using file open for read
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lirex.software at gmail dot com

this portion of the code works ONLY IF the code line characters_count++; is
absent:
characters_count=0;

stream = fopen (argv[1],r);

while ((c = fgetc(stream)) != EOF) 

{
characters_count++;
printf(total characters are %s\n, characters_count);
}


[Bug c++/59598] very simple code using file open for read

2013-12-25 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59598

--- Comment #1 from Denis Kolesnik lirex.software at gmail dot com ---
Created attachment 31512
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31512action=edit
C++ source file


[Bug c++/59598] very simple code using file open for read

2013-12-25 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59598

--- Comment #2 from Denis Kolesnik lirex.software at gmail dot com ---
echo off

PATH=%PATH%;c:\MinGW\bin;C:\MinGW\x86_64-w64-mingw32\bin



set application_file=main_app2

gcc replace_1.c


[Bug c++/54213] please help to determine whether it is an PostgreSQL error or GCC error (combobox and SQL data sorting)

2012-08-20 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54213

--- Comment #7 from Denis Kolesnik lirex.software at gmail dot com 2012-08-20 
15:12:04 UTC ---
(In reply to comment #4)
 Have you tried to reduce the problem to a simple source file where you only
 call the PostgreSQL functions?  Try that and see what happens.  Right now your
 source is huge and dependent on files most people here don't have access to.

I did try to make my program to look more compact, but anyway I find my code
beautiful.


[Bug c++/54333] New: sprinf and fprintf work not always equal

2012-08-20 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54333

 Bug #: 54333
   Summary: sprinf and fprintf work not always equal
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: lirex.softw...@gmail.com


Created attachment 28059
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28059
the c++ source file

in the following part of the code:

profit_tax_stream = fopen (test_write.txt,w);
profit_tax_stream2 = fopen (test2.txt,r);
//fputc(c, profit_tax_stream[0]);

fprintf(profit_tax_stream, testtest\ test 123);

strcpy(chBuffer,\0);
//strcat(chBuffer, adsadasda);

fscanf(profit_tax_stream2,%s, chBuffer);
fprintf(profit_tax_stream,%s, chBuffer);

//fscanf(profit_tax_stream2, chBuffer);
//fprintf(profit_tax_stream, chBuffer);
//fprintf(profit_tax_stream[0], ?xml version=\1.0\ encoding=\UTF-8\ ?);


fclose(profit_tax_stream);
fclose(profit_tax_stream2);

fscanf reads a portion of data delimited by space, but only
when I use

fscanf(profit_tax_stream2,%s, chBuffer);

but it reads nothing at all(I see nothing added to the file opened for write
and also I tried to output the content of chBuffer via Messagebox) when I use

fscanf(profit_tax_stream2, chBuffer);

line of code instead.

The problem is, that the opposite function fprintf works in both cases.


My operation system is Windows XP HOME Edition OEM Service Pack 3


My compile line:
c++ -ID:\Program Files\PostgreSQL\9.1\include -LD:\Program
Files\PostgreSQL\9.1\lib -lpq -o %application_file% %application_file%.cpp
-Wl,--subsystem,windows -lgdi32 -lcomctl32 -D_WIN32_IE=0x0300 -save-temps


[Bug c++/54333] sprinf and fprintf work not always equal

2012-08-20 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54333

--- Comment #2 from Denis Kolesnik lirex.software at gmail dot com 2012-08-20 
21:01:54 UTC ---
thanks for the quick answer!


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-19 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #19 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-19 18:15:49 UTC ---
(In reply to comment #18)
 Gcc cannot alter results of an SQL query, it's a bug in your program. This is
 the wrong place to get help debugging your code.

You are right: I consider now, that it is a PostgreSQL SQL bug.

limit 1 offset ... order byt str_last_name
filters data wrong...


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-19 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #20 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-19 18:21:08 UTC ---
sure: I found, that the bug is if I use limit 1 clause.

It is surelly a bug.


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |

--- Comment #16 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-18 21:16:21 UTC ---
(In reply to comment #14)
 Can you stop reopening this bug?  The problem again is that you are writing
 past the array bounds and anytime that happens it is undefined behavior. 
 Please fix the array bounds issue and you will see it works now.

Andrew I did fix my problem, but the program language standard of C is
violated.
That is why I consider it is as a bug.

Where I'm wrong here?


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #8 from Denis Kolesnik lirex.software at gmail dot com 2012-08-18 
21:19:51 UTC ---
my command line for compile:

c++ -ID:\Program Files\PostgreSQL\9.1\include -LD:\Program
Files\PostgreSQL\9.1\lib -lpq -o %application_file% %application_file%.cpp
-Wl,--subsystem,windows -lgdi32 -lcomctl32 -D_WIN32_IE=0x0300 -save-temps

-save-temps - this option I use to have all files included(assembler source,
etc...)


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #17 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-18 21:28:56 UTC ---
(In reply to comment #11)
 Also, you declare SQL_date_begin[10] then fill it with 11 characters
 (-MM-DD plus the numm terminator) and do the same with SQL_date_end
 
 This is horrible, horrible code and should be deleted immediately.
 
 (In reply to comment #5)
  it should work without problems, because of programming language syntax 
  which
  is a standart.
  But it works so, that SQL1 partially overwrites value of SQL_date_begin and
  values are
  not such as expected.
 
 Please check the standard before arguing about it. The C standard states that
 for the functions in string.h If an array is accessed beyond the end of an
 object, the behavior is undefined.  
 
 To understand undefined behaviour see:
 http://en.wikipedia.org/wiki/Undefined_behavior
 
 
  I never heard, that the C language is outdated. The C++ is just another
  standart which includes
  the syntax of C.
 
 Noone said it's outdated, what on earth are you talking about?
 
  So I consider it is as an GCC error which should be fixed, also because all
  standart libraries
  come along with GCC.
 
 No, the strcat and strcpy functions come from the C library provided by your
 OS, they do not come from GCC. If you still believe there is a bug then maybe
 you should report it to Microsoft instead.

thank you for understandable answer!


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #9 from Denis Kolesnik lirex.software at gmail dot com 2012-08-18 
21:41:05 UTC ---
(In reply to comment #6)
 Why is this marked enhancement ?
 
 Is this the same issue as PR 54213 ? If so please close that one.
 
 What exactly is your question and why do you think it's anything to do with
 GCC?

I want to be last names sorted in a combobox alphabetically and use for it
...order by str_last_name

Then I use one line returning SQL request, which helps to determine with wich
table id it is(by using SQL ...offset... and combobox item number) and data
represented with table id not equals with id returned by the second SQL query.

The problem is solved if I do not use ...order by str_last_name... but it is
not convenient to have data unsorted...


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

--- Comment #18 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-18 22:07:20 UTC ---
(In reply to comment #10)
 Your bug report is useless, you have not provided the information requested at
 http://gcc.gnu.org/bugs/ so it cannot be compiled or verified, and your
 description of the problem is hard to follow.
 
 The problem is that your array is too small for the data you write to the
 array. This has nothing to do with the order of declarations.
 
 You declare SQL1[150] then you call
 
 strcat(SQL1,select id,' ', to_char(dt_date,'DD.MM.'),' ',int_from,'
 ','',' ',int_to,' ',cur_amount,' ',(select str_comment from
 tbl_dic_payment_types where tbl_dic_payment_types.id=tbl_bills.int_type) as
 type,' ', (select case when int_type=1 then 'business' else 'personal' end 
 from
 tbl_bills_entity_type where tbl_bills_entity_type.int_bill=tbl_bills.id) as
 test2 from tbl_bills );
 
 That's more than 150 characters. Your program has a bug, not GCC.

I'm sorry, you are right! The problem was inside my program.


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #10 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-18 22:09:22 UTC ---
I'm sorry. That is my falut and the problem was that I overflowed variables
size causing undefined behaviour. Now I kwon what it is.


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

--- Comment #19 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-18 22:11:52 UTC ---
I'm sorry it is my falut, which caused undefined behaviour. I declared small
sized variables.


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |

--- Comment #11 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-18 22:13:31 UTC ---
(In reply to comment #10)
 I'm sorry. That is my falut and the problem was that I overflowed variables
 size causing undefined behaviour. Now I kwon what it is.

sorry, this comment was for the bug 54180


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #12 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-18 22:15:40 UTC ---
  What exactly is your question and why do you think it's anything to do with
  GCC?

that is one of my questions. Whether it is a GCC bug or PstgreSQL. Or even
againg my errors in my code.


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|DUPLICATE   |

--- Comment #14 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-19 00:44:57 UTC ---
(In reply to comment #13)
 This line contains a bug:
 
 strcpy(SQL1,select id, ' ', regexp_replace(str_last_name,' ','') as lastname,
 ' ', regexp_replace(str_first_name,' ','') as firstname, ' ', age(dt_birth) as
 age from tbl_owners_individual;);
 
 SQL1 only has capacity for 150 chars, but you write more than 170 to it. This
 is a serious bug in your program (not in GCC or postgresql).
 
 When you use the order by clause you write even more characters to the 
 array,
 which is still a bug.
 
 Either learn to use dynamically-allocated memory or ensure your arrays are big
 enough to hold the strings you write to them.
 
 This is the same issue as PR 54180
 
 *** This bug has been marked as a duplicate of bug 54180 ***

now my CHAR SQL1[350] as you see is 350 characters long, but the problem is the
same:

if I choose a filed from the combobox with the id 1 in the database table
the second query, which also ends with the clause ...order by
str_last_name...
returns the field with the id 111(if I remember correct), but should with 1.


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #15 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-19 00:45:56 UTC ---
(In reply to comment #13)
 This line contains a bug:
 
 strcpy(SQL1,select id, ' ', regexp_replace(str_last_name,' ','') as lastname,
 ' ', regexp_replace(str_first_name,' ','') as firstname, ' ', age(dt_birth) as
 age from tbl_owners_individual;);
 
 SQL1 only has capacity for 150 chars, but you write more than 170 to it. This
 is a serious bug in your program (not in GCC or postgresql).
 
 When you use the order by clause you write even more characters to the 
 array,
 which is still a bug.
 
 Either learn to use dynamically-allocated memory or ensure your arrays are big
 enough to hold the strings you write to them.
 
 This is the same issue as PR 54180
 
 *** This bug has been marked as a duplicate of bug 54180 ***

now my CHAR SQL1[350] as you see is 350 characters long, but the problem is the
same:

if I choose a field from the combobox with the id 1 in the database table
the second query, which also ends with the clause ...order by
str_last_name...
returns the field with the id 111(if I remember correct), but should with 1.


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

  Attachment #27972|0   |1
is obsolete||

--- Comment #16 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-19 00:51:37 UTC ---
Created attachment 28047
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28047
a newer c++ source file


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-18 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #17 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-19 00:54:19 UTC ---
(In reply to comment #10)
 I'm sorry. That is my falut and the problem was that I overflowed variables
 size causing undefined behaviour. Now I kwon what it is.

sorry for my bad english - know


[Bug c++/54291] New: why the value of the variable CHAR SQL_from_account[3] of is changed if it should not be changed?

2012-08-16 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54291

 Bug #: 54291
   Summary: why the value of the variable CHAR SQL_from_account[3]
of  is changed if it should not be changed?
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: critical
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: lirex.softw...@gmail.com


Created attachment 28033
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28033
a c++ source file

2 SQL requests update fields of accounts table and one adds a payment into
bills table.

The requests are for PostgreSQL server using their native library.

As I add a transaction from 1001 to 1000 for the first time all is ok,
but for the second time the value of the variable(! according to the C language
syntax it is a variable even if it is a CHAR characters 1 dimenisional array)
SQL_from_account changes it value from 1001 to 1000(but it should not).

So if I press add(caption in cyrillic, but function names, etc are in english)

Why is this?


[Bug c++/54291] why the value of the variable CHAR SQL_from_account[3] of is changed if it should not be changed?

2012-08-16 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54291

--- Comment #1 from Denis Kolesnik lirex.software at gmail dot com 2012-08-16 
21:04:28 UTC ---
Created attachment 28034
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28034
additional files to source asked


[Bug c++/54291] why the value of the variable CHAR SQL_from_account[3] of is changed if it should not be changed?

2012-08-16 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54291

--- Comment #2 from Denis Kolesnik lirex.software at gmail dot com 2012-08-16 
21:06:51 UTC ---
to THE source


[Bug c++/54291] why the value of the variable CHAR SQL_from_account[3] of is changed if it should not be changed?

2012-08-16 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54291

--- Comment #3 from Denis Kolesnik lirex.software at gmail dot com 2012-08-16 
21:09:24 UTC ---
Created attachment 28035
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28035
object file to the source


[Bug c++/54291] why the value of the variable CHAR SQL_from_account[3] of is changed if it should not be changed?

2012-08-16 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54291

--- Comment #4 from Denis Kolesnik lirex.software at gmail dot com 2012-08-16 
21:11:38 UTC ---
Created attachment 28036
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28036
assembler source file


[Bug c++/54291] why the value of the variable CHAR SQL_from_account[3] of is changed if it should not be changed?

2012-08-16 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54291

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

  Attachment #28034|0   |1
is obsolete||

--- Comment #5 from Denis Kolesnik lirex.software at gmail dot com 2012-08-16 
21:15:14 UTC ---
Created attachment 28037
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28037
additional files to the source asked


[Bug c++/54291] why the value of the variable CHAR SQL_from_account[3] of is changed if it should not be changed?

2012-08-16 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54291

--- Comment #6 from Denis Kolesnik lirex.software at gmail dot com 2012-08-16 
21:18:32 UTC ---
I know it could be because if accounts values are changed they
are sorted in reverse order(last changed), but my SQL request requests
in strict order and my program even not changes the value of SQL_from_account
in this function int apply_button_add(etc...).


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-16 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |

--- Comment #13 from Denis Kolesnik lirex.software at gmail dot com 
2012-08-16 22:35:01 UTC ---
I disagree: 
I know enough to use strcat and strcpy.

1: Why those functions work false and are dependent on variables(! I name it
correct even if it is one dimenision array of chararters) declare order I don't
know.

2: on this site there are enough people with very vary C and C++ language
skills, so this sites helps on learning also. I know too much people who
learner more from wrong experiences rather than from clear imagination.


[Bug c++/54213] please help to determine whether it is an PostgreSQL error or GCC error (combobox and SQL data sorting)

2012-08-16 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54213

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

 Resolution|WORKSFORME  |DUPLICATE

--- Comment #6 from Denis Kolesnik lirex.software at gmail dot com 2012-08-16 
22:38:19 UTC ---


*** This bug has been marked as a duplicate of bug 54214 ***


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-16 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #7 from Denis Kolesnik lirex.software at gmail dot com 2012-08-16 
22:38:19 UTC ---
*** Bug 54213 has been marked as a duplicate of this bug. ***


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-10 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |

--- Comment #9 from Denis Kolesnik lirex.software at gmail dot com 2012-08-10 
14:16:34 UTC ---
With any length(a length which is declared is of accepted range) it considered
as a variable, so it should be processed whithout dependance on
declare order.

Functions strcpy and strcat should handle so a CHAR array variable
as it is a line which ends correspondly. They even do, but not in any declare
order. They should do in in any declare order.

It is a bug anyway.


[Bug c++/54213] New: please help to determine wether it is an PostgreSQL error or GCC error (combobox and SQL data sorting)

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54213

 Bug #: 54213
   Summary: please help to determine wether it is an PostgreSQL
error or GCC error (combobox and SQL data sorting)
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: lirex.softw...@gmail.com


Created attachment 27968
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27968
a c++ source file

hello,

Windows XP (I guess, that it is an OEM version) Home edition, service pack 3
installed.

I use a PostgreSQL database and manipulate data from an GCC c++ application
under Windows XP.
I use libpq-fe.h library.

and I noticed, that if I use an SQL string ... order by... - then it could
represent data normally in an combobox element, but if I use a
second SQL query to find one field using almost the same query
then some ids from 1 and 2 queries are not equal.

I found a solution by excluding ... order by But it is not convient to
see surnames unsorted...

Is it a PostgreSQL error's side or GCC?
please help to determine, because I'm not professional on it.

My normal compiler options:

c++ -ID:\Program Files\PostgreSQL\9.1\include -LD:\Program
Files\PostgreSQL\9.1\lib -lpq -o %application_file% %application_file%.cpp
-Wl,--subsystem,windows -lgdi32 -lcomctl32 -D_WIN32_IE=0x0300

Compiler options to generate extra debug files:
c++ -ID:\Program Files\PostgreSQL\9.1\include -LD:\Program
Files\PostgreSQL\9.1\lib -lpq -o %application_file% %application_file%.cpp
-Wl,--subsystem,windows -lgdi32 -lcomctl32 -D_WIN32_IE=0x0300 -save-temps

Regards,
Denis Kolesnik.


[Bug c++/54213] please help to determine whether it is an PostgreSQL error or GCC error (combobox and SQL data sorting)

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54213

--- Comment #1 from Denis Kolesnik lirex.software at gmail dot com 2012-08-09 
19:56:25 UTC ---
Created attachment 27969
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27969
additional files to source asked


[Bug c++/54213] please help to determine whether it is an PostgreSQL error or GCC error (combobox and SQL data sorting)

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54213

--- Comment #2 from Denis Kolesnik lirex.software at gmail dot com 2012-08-09 
19:57:37 UTC ---
Created attachment 27970
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27970
object file


[Bug c++/54213] please help to determine whether it is an PostgreSQL error or GCC error (combobox and SQL data sorting)

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54213

--- Comment #3 from Denis Kolesnik lirex.software at gmail dot com 2012-08-09 
19:58:55 UTC ---
Created attachment 27971
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27971
assembler source file


[Bug c++/54213] please help to determine whether it is an PostgreSQL error or GCC error (combobox and SQL data sorting)

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54213

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||WORKSFORME


[Bug c++/54214] New: (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or GCC error (combobox and SQL data sorting)

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

 Bug #: 54214
   Summary: (corrected copyright notes in source file)please help
to determine whether it is an PostgreSQL error or GCC
error (combobox and SQL data sorting)
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: lirex.softw...@gmail.com


Created attachment 27972
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27972
a c++ source file

hello,

I use a PostgreSQL database and manipulate data from an GCC c++ application
under Windows XP.
I use libpq-fe.h library.

and I noticed, that if I use an SQL string ... order by... - then it could
represent data normally in an combobox element, but if I use a
second SQL query to find one field using almost the same query
then some ids from 1 and 2 queries are not equal.

I found a solution by excluding ... order by But it is not convient to
see surnames unsorted...

Is it a PostgreSQL error's side or GCC?
please help to determine, because I'm not professional on it.

Regards,
Denis Kolesnik.


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or GCC error (combobox and SQL data sorting)

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #1 from Denis Kolesnik lirex.software at gmail dot com 2012-08-09 
20:15:26 UTC ---
Created attachment 27973
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27973
additional files to source asked


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or GCC error (combobox and SQL data sorting)

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #2 from Denis Kolesnik lirex.software at gmail dot com 2012-08-09 
20:18:08 UTC ---
Created attachment 27974
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27974
object file


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or GCC error (combobox and SQL data sorting)

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #3 from Denis Kolesnik lirex.software at gmail dot com 2012-08-09 
20:19:29 UTC ---
Created attachment 27975
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27975
assembler source file


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #4 from Denis Kolesnik lirex.software at gmail dot com 2012-08-09 
20:22:40 UTC ---
operation system is Windows XP Home Edition(I guessit is an OEM version) with
Service Pack 3 installed.


[Bug c++/54214] (corrected copyright notes in source file)please help to determine whether it is an PostgreSQL error or a GCC error (combobox and SQL data sorting)

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54214

--- Comment #5 from Denis Kolesnik lirex.software at gmail dot com 2012-08-09 
20:24:54 UTC ---
my operation system is Windows XP Home Edition(I guess it is an OEM version)
with Service Pack 3 installed.


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |

--- Comment #5 from Denis Kolesnik lirex.software at gmail dot com 2012-08-09 
23:19:16 UTC ---
The syntax of the programming language C++ includes the syntax of the
programming language C
and also it should handle such common functions as strcat. 

So if I define variables in a such way:

CHAR SQL1[150], SQL2[150], SQL_date_payment[10], SQL_date_begin[10],
SQL_date_end[10],  SQL_result[100];   

instead of:

CHAR SQL_date_payment[10],SQL_date_begin[10], SQL_date_end[10], SQL1[150],
SQL2[150], SQL_result[100];   

(where variables for dates which I form using strcpy and strcat functions
stay after SQL1)

it should work without problems, because of programming language syntax which
is a standart.
But it works so, that SQL1 partially overwrites value of SQL_date_begin and
values are
not such as expected.


I never heard, that the C language is outdated. The C++ is just another
standart which includes
the syntax of C.

So I consider it is as an GCC error which should be fixed, also because all
standart libraries
come along with GCC.


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

Denis Kolesnik lirex.software at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |

--- Comment #7 from Denis Kolesnik lirex.software at gmail dot com 2012-08-09 
23:33:15 UTC ---
all those variables are defined, otherwise it would not compile. The main is,
that it is normal(both cases) for the C language syntax and both declaration
orders should work.

That is why it is a bug.


[Bug c++/54213] please help to determine whether it is an PostgreSQL error or GCC error (combobox and SQL data sorting)

2012-08-09 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54213

--- Comment #5 from Denis Kolesnik lirex.software at gmail dot com 2012-08-09 
23:37:18 UTC ---
please see comments for the bug 54214, because it is the same, but with
corrected copyright notes.


[Bug c++/54180] New: a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-05 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

 Bug #: 54180
   Summary: a bug using strcat function - it depends on variable
declare order, but it should not.
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: lirex.softw...@gmail.com


Created attachment 27940
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27940
source file

Hello,

I want to report bugs:

I using gcc gcc-4.6.1 on Microsoft Windows XP (service pack 3)
the options of the compiler:
c++ -ID:\Program Files\PostgreSQL\9.1\include -LD:\Program
Files\PostgreSQL\9.1\lib -lpq -o %application_file% %application_file%.cpp
-Wl,--subsystem,windows -lgdi32 -lcomctl32 -D_WIN32_IE=0x0300

the complete command line that triggers the bug:
just a part of my code which handles a window key pressure

the compiler output (error messages, warnings, etc.); and:
it outputs not the value which is expected, but partially(!) the value of other
variable:
if it should display a date with SQL_date_begin it displays a part of SQL1
(I replaced almost everywhere the parrword needed to access my Postgre SQL
database)

the function strcat works only proper 
if I declare char variables as follow:

CHAR SQL_date_begin[10], SQL_date_end[10],SQL1[150], SQL_result[100];   

but no way if:
CHAR SQL1[150], SQL_date_begin[10], SQL_date_end[10], SQL_result[100];   

somewhy in second order it owerwrites value of SQL_date_begin

note:

to form the value of SQL_date_begin I use 
strcpy(SQL_date_begin,);
wsprintf(chBuffer,_T(%d),date_time_begin.wYear);
strcat(SQL_date_begin,chBuffer);
strcat(SQL_date_begin,-);
...(only a part)

Regards,
Denis Kolesnik.


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-05 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

--- Comment #1 from Denis Kolesnik lirex.software at gmail dot com 2012-08-05 
15:08:35 UTC ---
Created attachment 27941
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27941
additional files to source asked


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-05 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

--- Comment #2 from Denis Kolesnik lirex.software at gmail dot com 2012-08-05 
15:10:47 UTC ---
Created attachment 27942
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27942
object file to source

all files modified in an text editor to change password - so it size may vary


[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.

2012-08-05 Thread lirex.software at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180

--- Comment #4 from Denis Kolesnik lirex.software at gmail dot com 2012-08-05 
15:12:58 UTC ---
Created attachment 27943
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27943
asm file as addition to the source