Click here to Skip to main content
15,909,530 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHelp on TAPI....... Pin
AmbiguousName23-Sep-10 5:04
AmbiguousName23-Sep-10 5:04 
QuestionRe: Help on TAPI....... Pin
David Crow23-Sep-10 8:33
David Crow23-Sep-10 8:33 
QuestionHandling all exceptions in application [modified] Pin
Code-o-mat23-Sep-10 3:37
Code-o-mat23-Sep-10 3:37 
AnswerRe: Handling all exceptions in application Pin
Aescleal23-Sep-10 4:34
Aescleal23-Sep-10 4:34 
GeneralRe: Handling all exceptions in application Pin
Code-o-mat23-Sep-10 4:47
Code-o-mat23-Sep-10 4:47 
GeneralRe: Handling all exceptions in application Pin
Aescleal23-Sep-10 5:28
Aescleal23-Sep-10 5:28 
GeneralRe: Handling all exceptions in application Pin
Code-o-mat23-Sep-10 5:42
Code-o-mat23-Sep-10 5:42 
QuestionWhy do I get warning C4748? Pin
Stefan_Lang23-Sep-10 1:51
Stefan_Lang23-Sep-10 1:51 
I am currently migrating a project from VS 2003 to VS2010 ans trying to eliminate all errors and warnings.

On several functions, I get the warning C4748 (can't protect from local buffer overflow because optimizations are deactivated in this function). The entry on MSDN states that this can happen if either optimization is explicitely disabled via #pragma, or if optimization is automatically disabled because the function contains assembler code.

Neither is the case in none of the functions. But why, then, do I get this warning? And, should I do anything about it, or (#pragma ) ignore?

Here's a greatly simplified piece of code that generates this warning:
class MyBase {
public:
    MyBase (){}
};
class MyPt : public MyBase {
public:
    double v[3];
};
void sum() {
    MyPt p1;
}

Note that removing either the constructor, MyBase(), or the data member, v[3], also removes the warning. Using standard double data members instead of an array also does not produce a warning. I am at a loss.
QuestionRe: Why do I get warning C4748? Pin
David Crow23-Sep-10 2:56
David Crow23-Sep-10 2:56 
AnswerRe: Why do I get warning C4748? Pin
Stefan_Lang23-Sep-10 3:14
Stefan_Lang23-Sep-10 3:14 
AnswerRe: Why do I get warning C4748? Pin
Maximilien23-Sep-10 3:34
Maximilien23-Sep-10 3:34 
QuestionRe: Why do I get warning C4748? Pin
David Crow23-Sep-10 4:21
David Crow23-Sep-10 4:21 
AnswerRe: Why do I get warning C4748? Pin
Maximilien23-Sep-10 4:43
Maximilien23-Sep-10 4:43 
GeneralRe: Why do I get warning C4748? Pin
Stefan_Lang23-Sep-10 4:34
Stefan_Lang23-Sep-10 4:34 
GeneralRe: Why do I get warning C4748? Pin
Luc Pattyn23-Sep-10 4:48
sitebuilderLuc Pattyn23-Sep-10 4:48 
GeneralRe: Why do I get warning C4748? Pin
Stefan_Lang23-Sep-10 6:55
Stefan_Lang23-Sep-10 6:55 
GeneralRe: Why do I get warning C4748? Pin
Luc Pattyn23-Sep-10 7:16
sitebuilderLuc Pattyn23-Sep-10 7:16 
AnswerRe: Why do I get warning C4748? [modified] Pin
Stefan_Lang23-Sep-10 23:03
Stefan_Lang23-Sep-10 23:03 
QuestionArray traversal Pin
T.RATHA KRISHNAN23-Sep-10 1:31
T.RATHA KRISHNAN23-Sep-10 1:31 
AnswerRe: Array traversal Pin
_AnsHUMAN_ 23-Sep-10 2:02
_AnsHUMAN_ 23-Sep-10 2:02 
GeneralRe: Array traversal Pin
Emilio Garavaglia23-Sep-10 4:11
Emilio Garavaglia23-Sep-10 4:11 
GeneralRe: Array traversal Pin
Niklas L23-Sep-10 21:04
Niklas L23-Sep-10 21:04 
AnswerRe: Array traversal Pin
KarstenK23-Sep-10 3:11
mveKarstenK23-Sep-10 3:11 
QuestionRemove Features/components from Windows 7 [modified] Pin
Aabid22-Sep-10 23:13
Aabid22-Sep-10 23:13 
AnswerRe: Remove Features/components from Windows 7 Pin
Maximilien23-Sep-10 0:51
Maximilien23-Sep-10 0:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.