BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

bcc32 does not complains

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Command Line Tools)
View previous topic :: View next topic  
Author Message
Jean Pierre Daviau
Guest





PostPosted: Sun Dec 03, 2006 12:25 am    Post subject: bcc32 does not complains Reply with quote



Hi everybody,

How do I set the compiler to a more strict behavior?



--
Thanks for your attention.

Jean Pierre Daviau
--
Easyphp1.8 with Apache1.3.24
DEVC++, borland 5.5
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
Processor Radeon7000 0x5159 agp
Back to top
Ed Mulroy
Guest





PostPosted: Sun Dec 03, 2006 12:58 am    Post subject: Re: bcc32 does not complains Reply with quote



You have not said what type of behavior you wish to be more strict so I can
only guess as to what you want. Try adding -w to the command line to the
left of all file names.

.. Ed

Quote:
Jean Pierre Daviau wrote in message
news:4571c4eb$1 (AT) newsgroups (DOT) borland.com...
Hi everybody,

How do I set the compiler to a more strict behavior?
--
Thanks for your attention.

Jean Pierre Daviau
--
Easyphp1.8 with Apache1.3.24
DEVC++, borland 5.5
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
Processor Radeon7000 0x5159 agp
Back to top
Jean Pierre Daviau
Guest





PostPosted: Sun Dec 03, 2006 1:07 am    Post subject: Re: bcc32 does not complains Reply with quote



char *tableau2[][2] = {{"allo", "World"},{"lo", "World"}};

printf("tableau2[1][2] : %s\n", tableau2[1][2]);

there is no place for tableau2[1][2];


"Ed Mulroy" <dont_email_me (AT) bitbuc (DOT) ket> a écrit dans le message de news:
4571ccaa$1 (AT) newsgroups (DOT) borland.com...
Quote:
You have not said what type of behavior you wish to be more strict so I
can only guess as to what you want. Try adding -w to the command line to
the left of all file names.

. Ed

Jean Pierre Daviau wrote in message
news:4571c4eb$1 (AT) newsgroups (DOT) borland.com...
Hi everybody,

How do I set the compiler to a more strict behavior?
--
Thanks for your attention.

Jean Pierre Daviau
--
Easyphp1.8 with Apache1.3.24
DEVC++, borland 5.5
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
Processor Radeon7000 0x5159 agp

Back to top
Jean Pierre Daviau
Guest





PostPosted: Sun Dec 03, 2006 1:16 am    Post subject: Re: bcc32 does not complains Reply with quote

for(; *++tableau[i] != NULL;) comparison between pointer and integer
Back to top
Ed Mulroy
Guest





PostPosted: Sun Dec 03, 2006 2:41 am    Post subject: Re: bcc32 does not complains Reply with quote

A warning there would not be correct.

The C and C++ languages specifically provide a basis for conversion between
and for comparison between a pointer and zero, a NULL pointer.

.. Ed

Quote:
Jean Pierre Daviau wrote in message
news:4571d0f2 (AT) newsgroups (DOT) borland.com...

for(; *++tableau[i] != NULL;) comparison between pointer and integer
Back to top
Ed Mulroy
Guest





PostPosted: Sun Dec 03, 2006 2:44 am    Post subject: Re: bcc32 does not complains Reply with quote

This is not Delphi. Neither of C nor C++ offer range checking. C++ offers
vectors and the string class. Had you used a vector of strings and the 'at'
operator an error or exception would be generated.

.. Ed

Quote:
Jean Pierre Daviau wrote in message
news:4571cee4 (AT) newsgroups (DOT) borland.com...

You have not said what type of behavior you wish to be more strict ...

char *tableau2[][2] = {{"allo", "World"},{"lo", "World"}};

printf("tableau2[1][2] : %s\n", tableau2[1][2]);

there is no place for tableau2[1][2];
Back to top
Ed Mulroy
Guest





PostPosted: Sun Dec 03, 2006 2:46 am    Post subject: Re: bcc32 does not complains Reply with quote

In addition if you used C++ Builder instead of the downloadable version 5
command line tools subset, you could enable CodeGuard which should flag an
invalid memory access.

.. Ed

Quote:
Jean Pierre Daviau wrote in message
news:4571cee4 (AT) newsgroups (DOT) borland.com...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Command Line Tools) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.