Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311326

Summary: if there is a scanf eclipse will not print to console until operations are over
Product: [Tools] CDT Reporter: Jim Shepherd <l4nce0>
Component: cdt-otherAssignee: Doug Schaefer <cdtdoug>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 0 DD 1.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Jim Shepherd CLA 2010-05-02 19:08:22 EDT
Build Identifier: 20100218-1602

I'm running on a fresh installation of eclipse. I have a project I'm working on.. a simple fill in the code homework assingment. Well its simple until nothing prints to concole. I have tested the issue and only appears if there is a scanf anywhere. Example.


#include <stdio.h>
#include <stdlib.h>

int main(void) {
	printf("!!!Hello World!!!"); /* prints !!!Hello World!!! */
	int test;
	scanf("%d", &test);
	printf("%d",test);
	return 0;
}

OUTPUT
(blank)
>>1
!!!Hello World!!!
1

Should be

!!!Hello World!!!
>>1
1


I'm running windows 7, using minGW.


Reproducible: Always

Steps to Reproduce:
1.blank project
2.add a scanf
3.run
Comment 1 Jim Shepherd CLA 2010-05-02 19:09:25 EDT
 fflush(stdout);
fixes some of it... but it will not print in my functions..
Comment 2 Andrew Gvozdev CLA 2010-05-02 21:46:04 EDT
See bug 173732 for workarounds.

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