]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
target.def (addr_space): Add new diagnose_usage to hook vector.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
b1c9c068
CP
12016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2
3 * c-parser.c (c_parser_oacc_declare): Don't scan for
4 GOMP_MAP_POINTER.
5 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
6 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
7 zero-length subarrays.
8
ddbbcb19
JJ
92016-07-15 Jakub Jelinek <jakub@redhat.com>
10
11 PR c/71858
12 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
13 instead of FUZZY_LOOKUP_NAME.
14 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
15 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
16
dd36b877
JJ
172016-07-14 Jakub Jelinek <jakub@redhat.com>
18
19 PR c/71858
20 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
21
8c681247
TS
222016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
23
24 * c-parser.c (c_parser_generic_selection): Make type of variable
25 auto_vec.
26 (c_parser_omp_declare_simd): Likewise.
27
bf4fa671
TS
282016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
29
30 * c-decl.c (struct c_struct_parse_info): Change member types
31 from vec to auto_vec.
32 (start_struct): Adjust.
33 (finish_struct): Likewise.
34
557e8c49
JJ
352016-07-02 Jakub Jelinek <jakub@redhat.com>
36
37 PR c/71719
38 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
39
54d19c3b
TS
402016-06-29 Thomas Schwinge <thomas@codesourcery.com>
41
42 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
43 Move pragma context checking into...
44 (c_parser_omp_cancellation_point): ... here, and improve
45 diagnostic messages.
46 * c-typeck.c (c_finish_omp_cancel)
47 (c_finish_omp_cancellation_point): Improve diagnostic messages.
48
152ef731
JJ
492016-06-29 Jakub Jelinek <jakub@redhat.com>
50
51 PR c/71685
52 * c-typeck.c (c_build_qualified_type): Don't clear
53 C_TYPE_INCOMPLETE_VARS for the main variant.
54
552016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
56
57 PR c/71552
58 * c-typeck.c (output_init_element): Diagnose incompatible types
59 before non-constant initializers.
60
e9ac1f86
JJ
612016-06-28 Jakub Jelinek <jakub@redhat.com>
62
63 * Make-lang.in: Don't cat ../stage_current if it does not exist.
64
277d7ee0
AK
652016-06-23 Andi Kleen <ak@linux.intel.com>
66
67 * Make-lang.in: Add support for autofdo.
68
1a4f11c8
DM
692016-06-22 David Malcolm <dmalcolm@redhat.com>
70
71 PR c/70339
72 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
73 (implicit_decl_warning): When issuing warnings for implicit
74 declarations, attempt to provide a suggestion via
75 lookup_name_fuzzy.
76 (undeclared_variable): Likewise when issuing errors.
77 (lookup_name_in_scope): Likewise.
78 (struct edit_distance_traits<cpp_hashnode *>): New struct.
79 (best_macro_match): New typedef.
80 (find_closest_macro_cpp_cb): New function.
81 (lookup_name_fuzzy): New function.
82 * c-parser.c: Include gcc-rich-location.h.
83 (c_token_starts_typename): Split out case CPP_KEYWORD into...
84 (c_keyword_starts_typename): ...this new function.
85 (c_parser_declaration_or_fndef): When issuing errors about
86 missing "struct" etc, add a fixit. For other kinds of errors,
87 attempt to provide a suggestion via lookup_name_fuzzy.
88 (c_parser_parms_declarator): When looking ahead to detect typos in
89 type names, also reject CPP_KEYWORD.
90 (c_parser_parameter_declaration): When issuing errors about
91 unknown type names, attempt to provide a suggestion via
92 lookup_name_fuzzy.
93 * c-tree.h (c_keyword_starts_typename): New prototype.
94
5a578671
JM
952016-06-20 Joseph Myers <joseph@codesourcery.com>
96
97 PR c/71601
98 * c-typeck.c (build_conditional_expr): Return error_mark_node if
99 c_common_type returns error_mark_node.
100
aa0db437
MS
1012016-06-19 Martin Sebor <msebor@redhat.com>
102
103 PR c/69507
104 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
105 __alignof__ (expression).
106
6a3f203c
DM
1072016-06-14 David Malcolm <dmalcolm@redhat.com>
108
109 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
110
264757fb
DM
1112016-06-14 David Malcolm <dmalcolm@redhat.com>
112
113 * c-typeck.c (build_component_ref): Simplify fixit code by
114 using gcc_rich_location::add_fixit_misspelled_id.
115 (set_init_label): Likewise.
116
f7e4f2e3
DM
1172016-06-13 David Malcolm <dmalcolm@redhat.com>
118
119 * c-parser.c (c_parser_initelt): Provide location of name for new
120 location_t param of set_init_label.
121 * c-tree.h (set_init_label): Add location_t param.
122 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
123 param and use it when issuing error messages about unrecognized
124 field names. Attempt to provide a fixit hint if appropriate,
125 otherwise update the error message to provide the type name.
126
4b1ffdb1
TS
1272016-06-10 Thomas Schwinge <thomas@codesourcery.com>
128
129 PR c/71381
130 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
131 Loosen checking.
132
44a845ca
MS
1332016-06-08 Martin Sebor <msebor@redhat.com>
134 Jakub Jelinek <jakub@redhat.com>
135
136 PR c++/70507
137 PR c/68120
138 * c-typeck.c (convert_arguments): Don't promote last argument
139 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
140
92a5f2ba
MP
1412016-06-08 Marek Polacek <polacek@redhat.com>
142
143 PR c/71418
144 * c-decl.c (grokdeclarator): Check TYPE_P.
145
08203f73
MP
146 PR c/71426
147 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
148 code.
149
6ffd47b7
DM
1502016-06-07 David Malcolm <dmalcolm@redhat.com>
151
152 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
153 and structure element reference, capture the location of the
154 element name token and pass it to build_component_ref.
155 (c_parser_postfix_expression_after_primary): Likewise for
156 structure element dereference.
157 (c_parser_omp_variable_list): Likewise for
158 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
159 * c-tree.h (build_component_ref): Add location_t param.
160 * c-typeck.c (build_component_ref): Add location_t param
161 COMPONENT_LOC. Use it, if available, when issuing hints about
162 mispelled member names to provide a fixit replacement hint.
163
1f40cff3
MP
1642016-06-06 Marek Polacek <polacek@redhat.com>
165
166 PR c/71362
167 * c-parser.c (c_parser_direct_declarator): Set location.
168
5545a907
MP
1692016-06-06 Marek Polacek <polacek@redhat.com>
170
171 * c-typeck.c (comptypes_internal): Handle comparisons of
172 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
173 TYPE_REF_CAN_ALIAS_ALL.
174
b605f663
CLT
1752016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
176
177 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
178 arguments as addressable when async clause exists.
179
00631022
JJ
1802016-05-30 Jakub Jelinek <jakub@redhat.com>
181
182 PR c++/71349
183 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
184 when combined with target construct.
185
7211a097
JJ
1862016-05-26 Jakub Jelinek <jakub@redhat.com>
187
188 * c-parser.c (c_parser_omp_clause_schedule): Warn if
189 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
190
95efe6b6
MP
1912016-05-25 Marek Polacek <polacek@redhat.com>
192
193 PR c/71265
194 * c-decl.c (c_make_fname_decl): Don't check seen_error.
195
a23faf7a
MP
196 PR c/71266
197 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
198
e46c7770
CP
1992016-05-24 Cesar Philippidis <cesar@codesourcery.com>
200
201 * c-parser.c (c_parser_oacc_declare): Add support for
202 GOMP_MAP_FIRSTPRIVATE_POINTER.
203 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
204 argument with enum c_omp_region_type ort.
205 (handle_omp_array_sections): Likewise. Update call to
206 handle_omp_array_sections_1.
207 (c_finish_omp_clauses): Add specific errors and warning messages for
208 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
209 call to handle_omp_array_sections.
210
a04e69c0
TS
2112016-05-24 Thomas Schwinge <thomas@codesourcery.com>
212
213 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
214
f17a223d
RB
2152016-05-24 Richard Biener <rguenther@suse.de>
216
217 PR middle-end/70434
218 PR c/69504
219 * c-typeck.c (build_array_ref): Do not complain about indexing
220 non-lvalue vectors. Adjust for function name change.
221
79063edd
MS
2222016-05-20 Martin Sebor <msebor@redhat.com>
223
224 PR c/71115
225 * c-typeck.c (error_init): Use
226 expansion_point_location_if_in_system_header.
227 (warning_init): Same.
228
8a40fef3
DM
2292016-05-19 David Malcolm <dmalcolm@redhat.com>
230
231 PR c/71171
232 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
233 in error-handling.
234 (c_parser_postfix_expression): Likewise.
235 * c-tree.h (c_expr::set_error): New method.
236 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
237 that result's range is initialized.
238
e9892350
JG
2392016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
240
241 * c-typeck.c (parser_build_unary_op): Fix formatting.
242
8fad45f5
MW
2432016-05-16 Matthew Wahab <matthew.wahab@arm.com>
244
245 * c-decl.c (grokdeclarator): Remove errmsg and use of
246 targetm.invalid_return_type.
247 (grokparms): Remove errmsg and use of
248 targetm.invalid_parameter_type.
249
aa4b467b
JM
2502016-05-13 Joseph Myers <joseph@codesourcery.com>
251
252 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
253 function return type.
254
4f2e1536
MP
2552016-05-12 Marek Polacek <polacek@redhat.com>
256
257 PR c/70756
258 * c-decl.c (build_compound_literal): Pass LOC down to
259 c_incomplete_type_error.
260 * c-tree.h (require_complete_type): Adjust declaration.
261 (c_incomplete_type_error): Likewise.
262 * c-typeck.c (require_complete_type): Add location parameter, pass it
263 down to c_incomplete_type_error.
264 (c_incomplete_type_error): Add location parameter, pass it down to
265 error_at.
266 (build_component_ref): Pass location down to c_incomplete_type_error.
267 (default_conversion): Pass location down to require_complete_type.
268 (build_array_ref): Likewise.
269 (build_function_call_vec): Likewise.
270 (convert_arguments): Likewise.
271 (build_unary_op): Likewise.
272 (build_c_cast): Likewise.
273 (build_modify_expr): Likewise.
274 (convert_for_assignment): Likewise.
275 (c_finish_omp_clauses): Likewise.
276
d6e83a8d
MM
2772016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
278
279 PR c/43651
280 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
281 is enabled.
282 * c-errors.c (pedwarn_c90): Return true if warned.
283 * c-tree.h (pedwarn_c90): Change return type to bool.
284 (enum c_declspec_word): Add new enumerator cdw_atomic.
285
5c3a10fb
MP
2862016-05-11 Marek Polacek <polacek@redhat.com>
287
288 PR c++/71024
289 * c-decl.c (diagnose_mismatched_decls): Factor out code to
290 diagnose_mismatched_attributes and call it.
291
cf68d92c
MP
2922016-05-10 Marek Polacek <polacek@redhat.com>
293
294 PR c/70255
295 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
296 on a declaration following the definition.
297
351f85c5
JJ
2982016-05-05 Jakub Jelinek <jakub@redhat.com>
299
300 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
301 parse it through to c_parser_c99_block_statement.
302 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
303 caller.
304
deef7113
MP
3052016-05-04 Marek Polacek <polacek@redhat.com>
306
307 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
308 OPT_Wdangling_else.
309
de55efd5
MP
3102016-05-04 Marek Polacek <polacek@redhat.com>
311
312 PR c/48778
313 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
314 for macro expansions.
315
79ce98bc
MP
3162016-05-03 Marek Polacek <polacek@redhat.com>
317
318 PR c/70859
319 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
320 check_builtin_function_arguments.
321
fb2647aa
RB
3222016-05-03 Richard Biener <rguenther@suse.de>
323
324 * Make-lang.in (cc1-checksum.c): For stage-final re-use
325 the checksum from the previous stage.
326
77886428
CP
3272016-05-02 Cesar Philippidis <cesar@codesourcery.com>
328
329 * c-parser.c (c_parser_oacc_all_clauses): Update call to
330 c_finish_omp_clauses.
331 (c_parser_omp_all_clauses): Likewise.
332 (c_parser_oacc_cache): Likewise.
333 (c_parser_oacc_loop): Likewise.
334 (omp_split_clauses): Likewise.
335 (c_parser_omp_declare_target): Likewise.
336 (c_parser_cilk_all_clauses): Likewise.
337 (c_parser_cilk_for): Likewise.
338 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
339 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
340
7176a4a0
MP
3412016-05-02 Marek Polacek <polacek@redhat.com>
342
343 PR c/70851
344 * c-decl.c (grokdeclarator): Diagnose when array's size has an
345 incomplete type.
346
e7ff0319
CP
3472016-04-29 Cesar Philippidis <cesar@codesourcery.com>
348
349 PR middle-end/70626
350 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
351 OACC_LOOP_CLAUSE_MASK.
352 (c_parser_oacc_kernels_parallel): Update call to
353 c_oacc_split_loop_clauses.
354
9f405ce1
AM
3552016-04-28 Andrew MacLeod <amacleod@redhat.com>
356
357 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
358 argument to build_modify_expr in two cases.
359
c1e1f433
BS
3602016-04-27 Bernd Schmidt <bschmidt@redhat.com>
361
362 * c-parser.c (c_parser_postfix_expression_after_primary): Call
363 warn_for_memset instead of warning directly here.
364
2448a956
MP
3652016-04-26 Marek Polacek <polacek@redhat.com>
366
367 PR c/67784
368 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
369 out of ...
370 (c_parser_for_statement): ... here.
371 (c_parser_if_statement): Use it.
372 (c_parser_switch_statement): Use it.
373 (c_parser_while_statement): Use it.
374
b02a5e26
MP
375 PR c/70791
376 * c-decl.c (pushdecl): Pass LOCUS down to warning.
377
477d4906
IV
3782016-04-20 Ilya Verbin <ilya.verbin@intel.com>
379
380 PR c++/69363
381 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
382 instead of c_finish_cilk_clauses.
383 * c-tree.h (c_finish_omp_clauses): Add new default argument.
384 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
385 floating-point variables in the linear clause for Cilk Plus.
386
fe37c7af
MM
3872016-04-18 Michael Matz <matz@suse.de>
388
389 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
390 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
391
949505a9
MP
3922016-04-15 Marek Polacek <polacek@redhat.com>
393
394 PR c/70671
395 * c-typeck.c (build_unary_op): Pass location down to error and
396 warning call.
397
dda1bf61
JJ
3982016-04-15 Jakub Jelinek <jakub@redhat.com>
399
400 PR c/70436
401 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
402 where needed.
403 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
404 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
405 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
406 Adjust c_parser_pragma callers.
407 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
408 caller.
409 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
410 c_parser_statement.
411 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
412 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
413 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
414 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
415 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
416 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
417 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
418 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
419 down where needed.
420 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
421 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
422 calls.
423
99cd9857
MP
4242016-04-13 Marek Polacek <polacek@redhat.com>
425
426 PR c/70436
427 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
428 adjust callers.
429 (c_parser_statement): Likewise.
430 (c_parser_c99_block_statement): Likewise.
431 (c_parser_while_statement): Likewise.
432 (c_parser_for_statement): Likewise.
433 (c_parser_if_body): Don't set IF_P here.
434 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
435 about dangling else here.
436 * c-tree.h (c_finish_if_stmt): Adjust declaration.
437 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
438 warn about dangling else here.
439
f13355da
MP
4402016-04-04 Marek Polacek <polacek@redhat.com>
441
442 PR c/70307
443 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
444
5fde6a45
MP
4452016-03-31 Marek Polacek <polacek@redhat.com>
446
447 PR c/70297
448 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
449
4bbf545b
DM
4502016-03-18 David Malcolm <dmalcolm@redhat.com>
451
452 PR c/70281
453 * c-parser.c (c_parser_postfix_expression): Set the source range
454 for uses of "__builtin_types_compatible_p".
455
fcc2b74f
JJ
4562016-03-17 Jakub Jelinek <jakub@redhat.com>
457
458 PR c/70280
459 * c-typeck.c (composite_type): Don't count void_list_node
460 into len, if the list is terminated by void_list_node, start
461 with void_list_node instead of NULL for newargs. Stop
462 at void_list_node.
463
ab4c578f
MP
4642016-03-16 Marek Polacek <polacek@redhat.com>
465
466 PR c/70093
467 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
468 nested functions returning VM types.
469
96b3c82d
CP
4702016-03-09 Cesar Philippidis <cesar@codesourcery.com>
471
472 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
473 when calling c_finish_omp_clauses.
474
29b9828f
BS
4752016-03-04 Bernd Schmidt <bschmidt@redhat.com>
476
477 PR c/69824
478 * c-decl.c (get_parm_info): Don't queue implicit function declarations
479 for later.
480
7ff6ca38
MP
4812016-03-04 Marek Polacek <polacek@redhat.com>
482
483 PR c/69798
484 * c-parser.c (c_parser_postfix_expression): Call
485 c_parser_cast_expression rather than c_parser_postfix_expression.
486
686e2237
JJ
4872016-03-01 Jakub Jelinek <jakub@redhat.com>
488
489 PR c/69796
490 PR c/69974
491 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
492 of incomplete decls to error_mark_node.
493
0b05329b
MP
4942016-02-24 Marek Polacek <polacek@redhat.com>
495
496 PR c/69819
497 * c-decl.c (finish_decl): Don't update the copy of the type of a
498 different decl type.
499
067fbd8b
JJ
5002016-02-23 Jakub Jelinek <jakub@redhat.com>
501
502 PR objc/69844
503 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
504 in id_kind reclassification.
505
bf14eba2
JJ
5062016-02-16 Jakub Jelinek <jakub@redhat.com>
507
508 PR c/69835
509 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
510
ba539195
JN
5112016-02-16 James Norris <jnorris@codesourcery.com>
512
513 PR c/64748
514 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
515
16595a1f
BS
5162016-02-12 Bernd Schmidt <bschmidt@redhat.com>
517
f48dfe98
BS
518 * c-decl.c (build_null_declspecs): Zero the entire struct.
519
16595a1f
BS
520 PR c/69522
521 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
522 callers changed. If nested_p is true, use it to call
523 finish_implicit_inits.
524 * c-tree.h (finish_implicit_inits): Declare.
525 * c-typeck.c (finish_implicit_inits): New function. Move code
526 from ...
527 (push_init_level): ... here.
528 (set_designator, process_init_element): Call finish_implicit_inits.
529
66756373
JJ
5302016-02-11 Jakub Jelinek <jakub@redhat.com>
531
532 PR c/69768
533 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
534 arguments for -Waddress warning.
535
1066e9b5
JJ
5362016-02-04 Jakub Jelinek <jakub@redhat.com>
537
538 PR c/69669
539 * c-decl.c (finish_enum): When honoring mode attribute,
540 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
541
3a5d2ba4
JJ
5422016-01-29 Jakub Jelinek <jakub@redhat.com>
543
544 PR debug/69518
545 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
546 all type variants, not just TYPE_MAIN_VARIANT.
547
cbdd8ae0
JJ
5482016-01-27 Jakub Jelinek <jakub@redhat.com>
549
550 PR debug/66869
551 * c-decl.c (c_write_global_declarations_1): Warn with
552 warn_unused_function if static prototype without definition
553 is not C_DECL_USED.
554
fa74a4bc
MP
5552016-01-27 Marek Polacek <polacek@redhat.com>
556
557 PR c/68062
558 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
559 to unsigned, if needed. Add -Wsign-compare warning.
560
13f92e8d
JJ
5612016-01-26 Jakub Jelinek <jakub@redhat.com>
562
563 PR tree-optimization/69483
564 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
565
cd8e73dc 5662016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
567
568 PR c/24293
569 * c-tree.h (incomplete_record_decls): Declare.
570 * c-parser.c (incomplete_record_decls): Define.
571 (c_parser_translation_unit): Iterate through incomplete_record_decls and
572 report error if any decl has zero size.
573 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
574 or enum type to incomplete_record_decls.
575
e6d6ec9e
TV
5762016-01-14 Tom de Vries <tom@codesourcery.com>
577
578 PR tree-optimization/68773
579 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
580 set force_output.
581
00083992
MP
5822016-01-14 Marek Polacek <polacek@redhat.com>
583
584 PR c/69262
585 * c-decl.c (grokdeclarator): Provide more information for invalid
586 array declarations.
587
7443cf13
DM
5882016-01-06 David Malcolm <dmalcolm@redhat.com>
589
590 * c-parser.c (c_parser_unary_expression): For dereferences, build
591 a combined location before calling build_indirect_ref, so that
592 error reports cover the full range, manually updating the c_expr
593 src_range.
594
6b131d5b
MP
5952016-01-06 Marek Polacek <polacek@redhat.com>
596
597 PR sanitizer/69099
598 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
599 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
600 NULL.
601
818ab71a
JJ
6022016-01-04 Jakub Jelinek <jakub@redhat.com>
603
604 Update copyright years.
605
2fe0a208
MP
6062016-01-04 Marek Polacek <polacek@redhat.com>
607
608 PR c/68908
609 * c-typeck.c (build_atomic_assign): Improve commentary. Add
610 optimization to use __atomic_fetch_* built-in if possible.
611
c7b48c8a
TS
6122015-12-23 Thomas Schwinge <thomas@codesourcery.com>
613
614 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
615 into...
616 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
617 all users.
618
fda5652f
MP
6192015-12-22 Marek Polacek <polacek@redhat.com>
620
621 PR c/69002
622 * c-typeck.c (build_component_ref): Warn when acessing elements of
623 atomic structures or unions.
624
745e411d
DM
6252015-12-21 David Malcolm <dmalcolm@redhat.com>
626
627 * c-typeck.c: Include "gcc-rich-location.h".
628 (build_binary_op): In the two places that call binary_op_error,
629 create a gcc_rich_location and populate it with the location of
630 the binary op and its two operands.
631
94c40e19
DM
6322015-12-16 David Malcolm <dmalcolm@redhat.com>
633
634 * c-parser.c (c_parser_statement_after_labels): When calling
635 c_finish_return, Use the return expression's location if it has
636 one, falling back to the location of the first token within it.
637 * c-typeck.c (c_finish_return): When issuing warnings about
638 the incorrect presence/absence of a return value, issue a note
639 showing the declaration of the function.
640
de67c4c3
DM
6412015-12-16 David Malcolm <dmalcolm@redhat.com>
642
643 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
644 to 4.
645 (c_parser_peek_nth_token): New function.
646 (c_parser_peek_conflict_marker): New function.
647 (c_parser_error): Detect conflict markers and report them as such.
648
a10704e1
DM
6492015-12-16 David Malcolm <dmalcolm@redhat.com>
650
651 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
652 to preserve range information for the primary expression
653 in the call to c_parser_postfix_expression_after_primary.
654
8062bca6
DM
6552015-12-16 David Malcolm <dmalcolm@redhat.com>
656
657 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
658 expression location, falling back on the first token location,
659 rather than always using the latter.
660
d06f8b75
MP
6612015-12-16 Marek Polacek <polacek@redhat.com>
662
663 PR c/64637
664 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
665 available.
666
2994fb91
MP
6672015-12-15 Marek Polacek <polacek@redhat.com>
668
669 PR c/68907
670 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
671 artificial decl.
672
a1b93f8d
DM
6732015-12-08 David Malcolm <dmalcolm@redhat.com>
674
675 * c-parser.c (c_parser_alignof_expression): Capture location of
676 closing parenthesis (if any), or of end of unary expression, and
677 use it to build a src_range for the expression.
678
46c6e1e2
DM
6792015-12-08 David Malcolm <dmalcolm@redhat.com>
680
681 PR c/68757
682 * c-parser.c (c_parser_get_builtin_args): Add
683 "out_close_paren_loc" param, and write back to it.
684 (c_parser_postfix_expression): Capture the closing
685 parenthesis location for RID_CHOOSE_EXPR,
686 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
687 RID_BUILTIN_SHUFFLE and use it to set the source range
688 for such expressions; within RID_BUILTIN_COMPLEX set
689 the underlying location.
690
66189108
MP
6912015-12-07 Marek Polacek <polacek@redhat.com>
692
693 PR c/68668
694 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
695 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
696
f187980b
EB
6972015-12-04 Eric Botcazou <ebotcazou@adacore.com>
698
699 * c-tree.h (c_build_va_arg): Adjust prototype.
700 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
701 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
702 parameter, adjust throughout and issue an error if EXPR is a component
703 with reverse storage order.
704
4250754e
JM
7052015-12-02 Jason Merrill <jason@redhat.com>
706
707 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
708 (c_fully_fold_internal, decl_constant_value_for_optimization):
709 Move from c-common.c.
710 * c-tree.h: Declare decl_constant_value_for_optimization.
711 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
712
e9e32ee6
JM
7132015-12-02 Joseph Myers <joseph@codesourcery.com>
714
715 PR c/68162
716 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
717 following link from declarator to next declarator. Track original
718 qualified type and pass it to c_build_qualified_type.
719 * c-typeck.c (c_build_qualified_type): Add arguments
720 orig_qual_type and orig_qual_indirect.
721
ff7a55bf
TS
7222015-12-02 Thomas Schwinge <thomas@codesourcery.com>
723
724 * c-parser.c (c_parser_omp_clause_name)
725 (c_parser_oacc_all_clauses): Alphabetical sorting.
726
657e4e47
JJ
7272015-12-02 Jakub Jelinek <jakub@redhat.com>
728
729 PR c/68533
730 * c-decl.c (get_parm_info): Use b->locus instead of input_location
731 for diagnostics.
732
37d5ad46
JB
7332015-12-01 Julian Brown <julian@codesourcery.com>
734 Cesar Philippidis <cesar@codesourcery.com>
735 James Norris <James_Norris@mentor.com>
736
737 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
738 (c_parser_oacc_clause_use_device): New function.
739 (c_parser_oacc_all_clauses): Add use_device support.
740 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
741 (c_parser_oacc_host_data): New function.
742 (c_parser_omp_construct): Add host_data support.
743 * c-tree.h (c_finish_oacc_host_data): Add prototype.
744 * c-typeck.c (c_finish_oacc_host_data): New function.
745 (c_finish_omp_clauses): Add use_device support.
746
a4850ce9
JH
7472015-11-29 Jan Hubicka <hubicka@ucw.cz>
748
749 PR c/67106
750 * c-decl.c: Set TYPE_PACKED in variants.
751
b58d3df2
ML
7522015-11-27 Martin Liska <mliska@suse.cz>
753
754 PR c++/68312
755 * c-array-notation.c (fix_builtin_array_notation_fn):
756 Use release_vec_vec instead of vec::release.
757 (build_array_notation_expr): Likewise.
758 (fix_conditional_array_notations_1): Likewise.
759 (fix_array_notation_expr): Likewise.
760 (fix_array_notation_call_expr): Likewise.
761
aec17bfe
JJ
7622015-11-27 Jakub Jelinek <jakub@redhat.com>
763
764 PR c/63326
765 * c-parser.c (c_parser_compound_statement_nostart): If
766 last_label is true, use pragma_stmt instead of pragma_compound
767 as second c_parser_pragma argument.
768 (c_parser_omp_ordered, c_parser_omp_target_update,
769 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
770 false as second argument to c_parser_skip_to_pragma_eol after
771 diagnosing standalone directives used in pragma_stmt context.
772
688c4de0
IV
7732015-11-24 Ilya Verbin <ilya.verbin@intel.com>
774
775 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
776 with "if (ENABLE_OFFLOADING)".
777
cbd03aee
DM
7782015-11-23 David Malcolm <dmalcolm@redhat.com>
779
780 PR objc/68438
781 * c-parser.c (c_parser_postfix_expression): Set up source ranges
782 for various Objective-C constructs: Class.name syntax,
783 @selector(), @protocol(), @encode(), and [] message syntax.
784
a87a86e1
DM
7852015-11-20 David Malcolm <dmalcolm@redhat.com>
786
787 PR 62314
788 * c-typeck.c (should_suggest_deref_p): New function.
789 (build_component_ref): Special-case POINTER_TYPE when
790 generating a "not a structure of union" error message, and
791 suggest a "->" rather than a ".", providing a fix-it hint.
792
8ece8dfb
DM
7932015-11-19 David Malcolm <dmalcolm@redhat.com>
794
795 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
796 candidate into a new function, find_closest_identifier.
797
433068cc
MP
7982015-11-19 Marek Polacek <polacek@redhat.com>
799
800 PR c/68412
801 * c-typeck.c (parser_build_binary_op): Properly handle
802 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
803
bef08b71
DM
8042015-11-17 David Malcolm <dmalcolm@redhat.com>
805
806 * c-parser.c (set_c_expr_source_range): Bulletproof both
807 overloaded implementations against NULL expr->value.
808 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
809 values.
810 (c_parser_unary_expression): Likewise when handling addresses of
811 labels.
812 (c_parser_postfix_expression): Likewise for statement expressions,
813 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
814 __builtin_va_arg, and for __builtin_offset_of.
815 (c_parser_postfix_expression_after_paren_type): Initialize expr's
816 src_range using the range of the braced initializer.
817 (c_parser_transaction_expression): Set src_range for "ret" to a
818 sane pair of values.
819
fff77217
KY
8202015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
821
822 * c-parser.c (c_finish_omp_declare_simd): Look for
823 "simd" attribute as well. Update error message.
824
1d899da2
TS
8252015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
826
827 * c-parser.c (c_parser_omp_declare_target): Adjust.
828
e4606348
JJ
8292015-11-14 Jakub Jelinek <jakub@redhat.com>
830
831 * c-typeck.c (c_finish_omp_clauses): Don't mark
832 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
833
3e636daf
MP
8342015-11-14 Marek Polacek <polacek@redhat.com>
835
836 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
837 * c-typeck.c: Likewise.
838
ebedc9a3
DM
8392015-11-13 David Malcolm <dmalcolm@redhat.com>
840
841 * c-decl.c (warn_defaults_to): Pass line_table to
842 rich_location ctor.
843 * c-errors.c (pedwarn_c99): Likewise.
844 (pedwarn_c90): Likewise.
845 * c-parser.c (set_c_expr_source_range): New functions.
846 (c_token::get_range): New method.
847 (c_token::get_finish): New method.
848 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
849 based on the range from the start of the LHS to the end of the
850 RHS.
851 (c_parser_conditional_expression): Likewise, based on the range
852 from the start of the cond.value to the end of exp2.value.
853 (c_parser_binary_expression): Call set_c_expr_source_range on
854 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
855 (c_parser_cast_expression): Call set_c_expr_source_range on ret
856 based on the cast_loc through to the end of the expr.
857 (c_parser_unary_expression): Likewise, based on the
858 op_loc through to the end of op.
859 (c_parser_sizeof_expression) Likewise, based on the start of the
860 sizeof token through to either the closing paren or the end of
861 expr.
862 (c_parser_postfix_expression): Likewise, using the token range,
863 or from the open paren through to the close paren for
864 parenthesized expressions.
865 (c_parser_postfix_expression_after_primary): Likewise, for
866 various kinds of expression.
867 * c-tree.h (struct c_expr): Add field "src_range".
868 (c_expr::get_start): New method.
869 (c_expr::get_finish): New method.
870 (set_c_expr_source_range): New decls.
871 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
872 on ret for prefix unary ops.
873 (parser_build_binary_op): Likewise, running from the start of
874 arg1.value through to the end of arg2.value.
875
ec8b536f
MP
8762015-11-13 Marek Polacek <polacek@redhat.com>
877
878 PR c/68320
879 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
880
277fe616
DM
8812015-11-13 David Malcolm <dmalcolm@redhat.com>
882
883 * c-typeck.c: Include spellcheck.h.
884 (lookup_field_fuzzy_find_candidates): New function.
885 (lookup_field_fuzzy): New function.
886 (build_component_ref): If the field was not found, try using
887 lookup_field_fuzzy and potentially offer a suggestion.
888
6e232ba4
JN
8892015-11-12 James Norris <jnorris@codesourcery.com>
890 Joseph Myers <joseph@codesourcery.com>
891
892 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
893 (c_parser_omp_clause_name): Handle 'device_resident' clause.
894 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
895 and PRAGMA_OMP_CLAUSE_LINK.
896 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
897 and PRAGMA_OACC_CLAUSE_LINK.
898 (OACC_DECLARE_CLAUSE_MASK): New definition.
899 (c_parser_oacc_declare): New function.
900
9be4f715
MP
9012015-11-12 Marek Polacek <polacek@redhat.com>
902
903 PR c/67784
904 * c-parser.c (c_parser_for_statement): Reclassify the token in
905 a correct scope.
906
e78bede6
MP
9072015-11-11 Marek Polacek <polacek@redhat.com>
908
909 PR c/68107
910 PR c++/68266
911 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
912 checking the size of an array.
913
69f293c9
AM
9142015-11-11 Andrew MacLeod <amacleod@redhat.com>
915
916 * c-array-notation.c: Remove unused header files.
917 * c-aux-info.c: Likewise.
918 * c-convert.c: Likewise.
919 * c-decl.c: Likewise.
920 * c-errors.c: Likewise.
921 * c-lang.c: Likewise.
922 * c-objc-common.c: Likewise.
923 * c-parser.c: Likewise.
924 * c-typeck.c: Likewise.
925 * gccspec.c: Likewise.
926
3a40d81d
NS
9272015-11-09 Thomas Schwinge <thomas@codesourcery.com>
928 Cesar Philippidis <cesar@codesourcery.com>
929 James Norris <jnorris@codesourcery.com>
930 Julian Brown <julian@codesourcery.com>
931 Nathan Sidwell <nathan@codesourcery.com>
932
933 c/
934 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
935 routine arg.
936 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
937 (c_parser_pragma): Parse 'acc routine'.
938 (OACC_ROUTINE_CLAUSE_MARK): Define.
939 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
940
fc402eec
AA
9412015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
942
943 PR debug/67192
944 * c-typeck.c (c_finish_loop): For unconditional loops, set the
945 location of the backward-goto to the start of the loop body.
946
f6b0b3db
AA
9472015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
948
949 PR debug/67192
950 * c-parser.c (c_parser_while_statement): Finish the loop before
951 parsing ahead for misleading indentation.
952 (c_parser_for_statement): Likewise.
953
ee45a32d
EB
9542015-11-08 Eric Botcazou <ebotcazou@adacore.com>
955
956 * c-decl.c (finish_struct): If the structure has reverse storage
957 order, rewrite the type of array fields with scalar component. Call
958 maybe_apply_pragma_scalar_storage_order on entry.
959 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
960 errors on bit-fields and reverse SSO here and not...
961 (c_mark_addressable): ...here.
962 (output_init_element): Adjust call to initializer_constant_valid_p.
963 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
964
8a645150
DM
9652015-11-06 David Malcolm <dmalcolm@redhat.com>
966
967 * c-decl.c (warn_defaults_to): Update for change in signature
968 of diagnostic_set_info.
969 * c-errors.c (pedwarn_c99): Likewise.
970 (pedwarn_c90): Likewise.
971 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
972 for textinfo::set_location.
973
7a5e4956
CP
9742015-11-05 Cesar Philippidis <cesar@codesourcery.com>
975 Thomas Schwinge <thomas@codesourcery.com>
976 James Norris <jnorris@codesourcery.com>
977
978 * c-parser.c (c_parser_omp_clause_name): Add support for
979 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
980 (c_parser_omp_clause_default): Add is_oacc argument. Handle
981 default(none) in OpenACC.
982 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
983 arguments.
984 (c_parser_oacc_clause_tile): New function.
985 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
986 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
987 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
988 TILE}.
989 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
990 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
991 FIRSTPRIVATE}.
992 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
993 (c_parser_oacc_update): Update the error message for missing clauses.
994 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
995 and OMP_CLAUSE_INDEPENDENT.
996
bfcfbfa0
MP
9972015-11-05 Marek Polacek <polacek@redhat.com>
998
999 PR c/68090
1000 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1001 deal with pre-evaluation on invalid types.
1002
e01d41e5
JJ
10032015-11-05 Jakub Jelinek <jakub@redhat.com>
1004 Ilya Verbin <ilya.verbin@intel.com>
1005
1006 * c-parser.c: Include context.h and gimple-expr.h.
1007 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1008 monotonic together with nonmonotonic.
1009 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1010 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1011 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1012 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1013 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1014 expressions on combined target teams before the target.
1015 (c_parser_omp_declare_target): If decl has "omp declare target" or
1016 "omp declare target link" attribute, and cgraph or varpool node already
1017 exists, then set corresponding flags. Call c_finish_omp_clauses
1018 in the parenthesized extended-list syntax case.
1019 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1020 declare target.
1021 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1022 on OMP_CLAUSE_REDUCTION array sections.
1023 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1024 into the constant offset, or for variable low-bound using
1025 POINTER_PLUS_EXPR. For structure element based array sections use
1026 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1027 (c_finish_omp_clauses): Drop generic_field_head, structure
1028 elements are now always mapped even as array section bases,
1029 diagnose same var in data sharing and mapping clauses. Diagnose if
1030 linear step on declare simd is neither a constant nor a uniform
1031 parameter. Look through POINTER_PLUS_EXPR for array section
1032 reductions. Diagnose the same var or function appearing multiple
1033 times on the same directive. Fix up wording for the to clause if t
1034 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1035 modifier on kinds other than dynamic or guided or nonmonotonic
1036 modifier together with ordered clause.
1037
4bf9e5a8
TS
10382015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1039 Chung-Lin Tang <cltang@codesourcery.com>
1040
1041 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1042
2adfab87
AM
10432015-10-29 Andrew MacLeod <amacleod@redhat.com>
1044
1045 * c-array-notation.c: Reorder #include's and remove duplicates.
1046 * c-aux-info.c: Likewise.
1047 * c-convert.c: Likewise.
1048 * c-decl.c: Likewise.
1049 * c-errors.c: Likewise.
1050 * c-lang.c: Likewise.
1051 * c-objc-common.c: Likewise.
1052 * c-parser.c: Likewise.
1053 * c-typeck.c: Likewise.
1054
e922069e
JW
10552015-10-26 Jim Wilson <jim.wilson@linaro.org>
1056
1057 PR debug/66068
1058 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1059 after calling build_qualified_type.
1060
765dd391
CP
10612015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1062 Thomas Schwinge <thomas@codesourcery.com>
1063 James Norris <jnorris@codesourcery.com>
1064 Joseph Myers <joseph@codesourcery.com>
1065 Julian Brown <julian@codesourcery.com>
1066 Bernd Schmidt <bschmidt@redhat.com>
1067
1068 * c-parser.c (c_parser_oacc_shape_clause): New.
1069 (c_parser_oacc_simple_clause): New.
1070 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1071 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1072
88bae6f4
TS
10732015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1074 James Norris <jnorris@codesourcery.com>
1075 Cesar Philippidis <cesar@codesourcery.com>
1076
1077 PR c/64765
1078 PR c/64880
1079 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1080 parameters, and handle these. Adjust all users.
1081 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1082 into...
1083 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1084 all users.
1085 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1086 declare functions.
1087 (c_finish_omp_construct): Declare function.
1088 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1089 Merge functions into...
1090 (c_finish_omp_construct): ... this new function.
1091
a8fc2579
RB
10922015-10-22 Richard Biener <rguenther@suse.de>
1093
1094 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1095 before folding a MINUS_EXPR.
1096
e9122ef6
MP
10972015-10-21 Marek Polacek <polacek@redhat.com>
1098
1099 PR c/68024
1100 * c-decl.c (start_function): Warn about vararg functions without
1101 a prototype.
1102
9f47c7e5
IE
11032015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1104
1105 * c-typeck.c (build_conditional_expr): Use boolean vector
1106 type for vector comparison.
1107 (build_vec_cmp): New.
1108 (build_binary_op): Use build_vec_cmp for comparison.
1109
fa60eeb9
MP
11102015-10-20 Marek Polacek <polacek@redhat.com>
1111
1112 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1113
2c7020eb
MP
11142015-10-20 Marek Polacek <polacek@redhat.com>
1115
1116 PR c/67964
1117 * c-parser.c (c_parser_attributes): Break out of the loop if the
1118 token after an attribute isn't a comma.
1119
d9a6bd32
JJ
11202015-10-13 Jakub Jelinek <jakub@redhat.com>
1121 Aldy Hernandez <aldyh@redhat.com>
1122
1123 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1124 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1125 (c_parser_omp_variable_list): Handle structure elements for
1126 map, to and from clauses. Handle array sections in reduction
1127 clause. Formatting fixes.
1128 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1129 if clause modifiers.
1130 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1131 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1132 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1133 c_parser_omp_clause_is_device_ptr): New functions.
1134 (c_parser_omp_clause_ordered): Parse optional parameter.
1135 (c_parser_omp_clause_reduction): Handle array reductions.
1136 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1137 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1138 functions.
1139 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1140 (c_parser_omp_clause_depend_sink): New function.
1141 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1142 (c_parser_omp_clause_map): Parse release/delete map kinds and
1143 optional always modifier.
1144 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1145 and c_finish_omp_clauses callers.
1146 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1147 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1148 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1149 (OMP_CRITICAL_CLAUSE_MASK): Define.
1150 (c_parser_omp_critical): Parse critical clauses.
1151 (c_parser_omp_for_loop): Handle doacross loops, adjust
1152 c_finish_omp_for and c_finish_omp_clauses callers.
1153 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1154 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1155 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1156 (c_parser_omp_for): Disallow ordered clause when combined with
1157 distribute. Disallow linear clause when combined with distribute
1158 and not combined with simd.
1159 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1160 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1161 parse clauses and if depend clause is found, don't parse a body.
1162 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1163 Allow target parallel without for after it.
1164 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1165 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1166 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1167 invalid kinds.
1168 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1169 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1170 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1171 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1172 functions.
1173 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1174 defaultmap and is_device_ptr clauses.
1175 (c_parser_omp_target): Parse target parallel and target simd. Set
1176 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1177 and target exit data. Diagnose invalid map kinds.
1178 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1179 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1180 construct.
1181 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1182 &omp_priv.
1183 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1184 (c_parser_omp_taskloop): New function.
1185 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1186 handle PRAGMA_OMP_TASKLOOP.
1187 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1188 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1189 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1190 Add IS_OMP argument, handle structure element bases, diagnose
1191 bitfields, pass IS_OMP recursively, diagnose known zero length
1192 array sections in depend clauses, handle array sections in reduction
1193 clause, diagnose negative length even for pointers.
1194 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1195 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1196 array sections in reduction clause, set
1197 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1198 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1199 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1200 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1201
21ba0cea
MP
12022015-10-06 Marek Polacek <polacek@redhat.com>
1203
1204 * c-parser.c (c_parser_statement_after_labels): Use
1205 protected_set_expr_location.
1206 (c_parser_omp_clause_num_gangs): Likewise.
1207 (c_parser_omp_clause_num_threads): Likewise.
1208 (c_parser_omp_clause_num_workers): Likewise.
1209 (c_parser_omp_clause_vector_length): Likewise.
1210 (c_parser_omp_clause_num_teams): Likewise.
1211 (c_parser_omp_clause_thread_limit): Likewise.
1212 * c-typeck.c (build_c_cast): Likewise.
1213 (c_cast_expr): Likewise.
1214
624d31fe
RS
12152015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1216
1217 * c-typeck.c (c_tree_equal): Use real_equal instead of
1218 REAL_VALUES_EQUAL.
1219
b8fd7909
JM
12202015-10-04 Jason Merrill <jason@redhat.com>
1221
1222 * c-parser.c (c_lex_one_token): Handle @synchronized.
1223 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1224 can change whether the function is transaction_safe.
1225
1c7485af
MP
12262015-10-02 Marek Polacek <polacek@redhat.com>
1227
1228 PR c/67730
1229 * c-typeck.c (convert_for_assignment): Use the expansion point
1230 location throughout.
1231
3e3b8d63
MP
12322015-10-02 Marek Polacek <polacek@redhat.com>
1233
1234 PR c/64249
1235 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1236 and pass it down to c_parser_if_statement.
1237 (c_parser_else_body): Add CHAIN parameter and pass it down to
1238 c_parser_statement_after_labels.
1239 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1240 duplicated if-else-if conditions.
1241
aabef2de
MP
12422015-10-01 Marek Polacek <polacek@redhat.com>
1243
1244 * c-typeck.c (convert_for_assignment): Improve commentary.
1245
de8ddd5f
MP
12462015-09-30 Marek Polacek <polacek@redhat.com>
1247
1248 PR c/67730
1249 * c-typeck.c (c_finish_return): Use the expansion point location for
1250 certain "return with value" warnings.
1251
c4914de6
MLI
12522015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1253
1254 * c-parser.c (pragma_lex): Add loc argument.
1255
0e36f5c7
MP
12562015-09-15 Marek Polacek <polacek@redhat.com>
1257
1258 PR c/67580
1259 * c-decl.c (tag_exists_p): New function.
1260 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1261 struct/union/enum keywords are missing.
1262 * c-tree.h (tag_exists_p): Declare.
1263
2f3bb934
MP
12642015-09-15 Marek Polacek <polacek@redhat.com>
1265
1266 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1267 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1268 Return NULL_TREE instead of 0.
1269 (lookup_name): Return NULL_TREE instead of 0.
1270 (lookup_name_in_scope): Likewise.
1271 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1272 (parser_xref_tag): Use false instead of 0.
1273 (start_struct): Use true instead of 1.
1274 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1275
aa256c4a
MP
12762015-09-14 Marek Polacek <polacek@redhat.com>
1277
1278 * c-typeck.c (set_nonincremental_init_from_string): Use
1279 HOST_WIDE_INT_M1U when shifting a negative value.
1280
dbb68221
MW
12812015-09-09 Mark Wielaard <mjw@redhat.com>
1282
1283 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1284 parm against NULL.
1285
a8a098ac
JJ
12862015-09-10 Jakub Jelinek <jakub@redhat.com>
1287
1288 PR c/67502
1289 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1290 into OMP_FOR_PRE_BODY rather than before the loop.
1291
f4b189d5
JJ
12922015-09-09 Jakub Jelinek <jakub@redhat.com>
1293
0bb99c11
JJ
1294 PR c/67501
1295 * c-parser.c (c_parser_oacc_all_clauses,
1296 c_parser_omp_all_clauses): Remove invalid clause from
1297 list of clauses even if parser->error is set.
1298
fce5e5e3
JJ
1299 PR c/67500
1300 * c-parser.c (c_parser_omp_clause_aligned,
1301 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1302 test for errors.
1303 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1304 error_mark_node.
1305
f4b189d5
JJ
1306 PR c/67495
1307 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1308 instead of c_parser_unary_expression. If the result is !lvalue_p,
1309 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1310
b2aaf235
MP
13112015-09-04 Marek Polacek <polacek@redhat.com>
1312
1313 PR sanitizer/67279
1314 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1315
1807ffc1
MS
13162015-09-03 Martin Sebor <msebor@redhat.com>
1317
1318 PR c/66516
8b652e65
JJ
1319 * c-typeck.c (convert_arguments, parser_build_unary_op,
1320 build_conditional_expr, c_cast_expr, convert_for_assignment,
1321 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1322 reject_gcc_builtin.
1323 (c_decl_implicit): Define.
1324
d04ff417
MP
13252015-09-02 Marek Polacek <polacek@redhat.com>
1326
1327 PR c/67432
1328 * c-parser.c (c_parser_enum_specifier): Give a better error for
1329 an empty enum.
1330
a79683d5
TS
13312015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1332
1333 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1334
191a6b94
MP
13352015-08-12 Marek Polacek <polacek@redhat.com>
1336
1337 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1338 LOC to it.
1339
420a9d9b
MP
13402015-08-03 Marek Polacek <polacek@redhat.com>
1341
1342 PR c/67088
1343 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1344 Use it.
1345 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1346
992118a1
PP
13472015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1348
1349 * c-parser.c (c_parser_if_body): Take token_indent_info
1350 argument. Call warn_for_misleading_indentation even when the
1351 body is a semicolon. Extract token_indent_infos corresponding
1352 to the guard, body and next tokens. Adjust call to
1353 warn_for_misleading_indentation accordingly.
1354 (c_parser_else_body): Likewise.
1355 (c_parser_if_statement): Likewise.
1356 (c_parser_while_statement): Likewise.
1357 (c_parser_for_statement): Likewise.
1358
46308474
LFSM
13592015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1360 Manuel López-Ibáñez <manu@gcc.gnu.org>
1361
1362 * c-decl.c (get_parm_info): Remove static var. Update warning
1363 message.
1364
05b28fd6
MP
13652015-07-27 Marek Polacek <polacek@redhat.com>
1366
1367 PR c++/66555
1368 PR c/54979
1369 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1370
451b5e48
MP
13712015-07-20 Marek Polacek <polacek@redhat.com>
1372
1373 PR c++/55095
1374 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1375 (build_binary_op): Warn about left shift overflows.
1376
1916bcb5
AM
13772015-07-09 Andrew MacLeod <amacleod@redhat.com>
1378
1379 * c-array-notation.c: Adjust includes for flags.h changes.
1380 * c-objc-common.c: Likewise.
1381
c7131fb2
AM
13822015-07-07 Andrew MacLeod <amacleod@redhat.com>
1383
1384 * c-array-notation.c: Adjust includes.
1385 * c-aux-info.c: Likewise.
1386 * c-convert.c: Likewise.
1387 * c-decl.c: Likewise.
1388 * c-errors.c: Likewise.
1389 * c-lang.c: Likewise.
1390 * c-objc-common.c: Likewise.
1391 * c-parser.c: Likewise.
1392 * c-typeck.c: Likewise.
1393
da2e71c9
MLI
13942015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1395
1396 PR fortran/66605
1397 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1398
b155cfd9
MP
13992015-06-29 Marek Polacek <polacek@redhat.com>
1400
1401 PR c/66322
1402 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1403 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1404 about -Wswitch-bool here.
1405 (do_case): Update c_add_case_label call.
1406 (c_finish_case): Update c_do_switch_warnings call.
1407
31521951
MP
14082015-06-27 Marek Polacek <polacek@redhat.com>
1409
1410 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1411
22d03525
MP
14122015-06-26 Marek Polacek <polacek@redhat.com>
1413
1414 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1415 INDIRECT_REF_P.
1416 * c-typeck.c (array_to_pointer_conversion): Likewise.
1417 (build_unary_op): Likewise.
1418 (c_finish_return): Likewise.
1419
f0889939
AM
14202015-06-25 Andrew MacLeod <amacleod@redhat.com>
1421
1422 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1423 * c-parser.c: Likewise.
1424
8d67ee55
RS
14252015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1426
1427 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1428 instead of pointer_hash.
1429 (detect_field_duplicates): Likewise.
1430
0ae9bd27
MP
14312015-06-25 Marek Polacek <polacek@redhat.com>
1432
1433 * c-array-notation.c: Use VAR_P throughout.
1434 * c-decl.c: Likewise.
1435 * c-objc-common.c: Likewise.
1436 * c-parser.c: Likewise.
1437 * c-typeck.c: Likewise.
1438
62f9079a
MP
14392015-06-25 Marek Polacek <polacek@redhat.com>
1440
1441 * c-decl.c: Use is_global_var throughout.
1442 * c-parser.c: Likewise.
1443 * c-typeck.c: Likewise.
1444
abb226c9
AM
14452015-06-17 Andrew MacLeod <amacleod@redhat.com>
1446
1447 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1448 * c-aux-info.c: Likewise.
1449 * c-convert.c: Likewise.
1450 * c-decl.c: Likewise.
1451 * c-errors.c: Likewise.
1452 * c-lang.c: Likewise.
1453 * c-objc-common.c: Likewise.
1454 * c-parser.c: Likewise.
1455 * c-typeck.c: Likewise.
1456
8cbababc
JH
14572015-06-11 Jan Hubicka <hubicka@ucw.cz>
1458
1459 PR middle-end/66325
1460 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1461 variants.
1462
a0349665
PMR
14632015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1464
1465 * c-decl.c (pop_scope): Register the main translation unit
1466 through the new debug hook.
1467
13fdf2e2
AM
14682015-06-08 Andrew MacLeod <amacleod@redhat.com>
1469
1470 * c-array-notation.c : Adjust include files.
1471 * c-aux-info.c : Likewise.
1472 * c-convert.c : Likewise.
1473 * c-decl.c : Likewise.
1474 * c-errors.c : Likewise.
1475 * c-lang.c : Likewise.
1476 * c-lang.h : Likewise.
1477 * c-objc-common.c : Likewise.
1478 * c-parser.c : Likewise.
1479 * c-typeck.c : Likewise.
1480
d7438551
AH
14812015-06-05 Aldy Hernandez <aldyh@redhat.com>
1482
1483 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1484 immediately clobber it.
1485 (c_write_global_declarations_1): Remove call to
1486 check_global_declaration_1.
1487 (c_write_global_declarations_2): Remove.
1488 (c_write_final_cleanups): Rename from c_write_global_declarations.
1489 Remove call to finalize_compilation_unit.
1490 Remove calls to debugging hooks.
1491 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1492 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1493 * c-tree.h: Remove c_write_global_declarations.
1494
ecb9f223
AM
14952015-06-04 Andrew MacLeod <amacleod@redhat.com>
1496
1497 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1498 * c-aux-info.c: Likewise.
1499 * c-convert.c: Likewise.
1500 * c-decl.c: Likewise.
1501 * c-errors.c: Likewise.
1502 * c-lang.c: Likewise.
1503 * c-objc-common.c: Likewise.
1504 * c-parser.c: Likewise.
1505 * c-typeck.c: Likewise.
1506
9482b620
MP
15072015-06-04 Marek Polacek <polacek@redhat.com>
1508
1509 PR c/66341
1510 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1511 it is a lvalue.
1512
bc51ace3
PK
15132015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1514
1515 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1516 Warn for empty struct.
1517 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1518
ea5b45b6
AT
15192015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1520
1521 * c-decl.c (start_function): Call plugin before parsing.
1522 (finish_function): Call plugin after parsing.
1523
c2d47482
PK
15242015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1525
1526 PR c/49551
1527 * c-decl.c (merge_decls): Merge DECL_COMMON.
1528
a95492ab
JW
15292015-05-22 Jim Wilson <jim.wilson@linaro.org>
1530
1531 * Make-lang.in (check_gcc_pallelize): Define.
1532
fd5c817a
MP
15332015-05-22 Marek Polacek <polacek@redhat.com>
1534
1535 PR c/47043
1536 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1537 attributes.
1538
c7b70a3c
MP
15392015-05-21 Marek Polacek <polacek@redhat.com>
1540
1541 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1542 DECL_BUILT_IN.
1543
21b634ae
MP
15442015-05-20 Marek Polacek <polacek@redhat.com>
1545
1546 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1547 * c-typeck.c: Likewise.
1548
296a8c2f
MP
15492015-05-19 Marek Polacek <polacek@redhat.com>
1550
1551 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1552
41b37d5e
JJ
15532015-05-19 Jakub Jelinek <jakub@redhat.com>
1554
1555 PR middle-end/66199
1556 * c-parser.c (c_parser_omp_for_loop): Don't add
1557 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1558 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1559 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1560 constructs.
1561
fab27f52
MM
15622015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1563
1564 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1565 swaps.
fab27f52 1566
40de31cf
MLI
15672015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1568
1569 PR fortran/44054
1570 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1571 accessor function.
1572
3aa3c9fc
MP
15732015-05-14 Marek Polacek <polacek@redhat.com>
1574
1575 PR c/66066
1576 PR c/66127
1577 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1578 rather than with 0.
1579
c3388e62
DM
15802015-05-12 David Malcolm <dmalcolm@redhat.com>
1581
1582 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1583 to add a call to warn_for_misleading_indentation.
1584 (c_parser_else_body): Likewise, adding param "else_loc".
1585 (c_parser_if_statement): Check for misleading indentation.
1586 (c_parser_while_statement): Likewise.
1587 (c_parser_for_statement): Likewise.
1588
755e528f
MP
15892015-05-08 Marek Polacek <polacek@redhat.com>
1590
1591 PR c/64918
1592 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1593 (output_init_element): Likewise.
1594
0173bd2a
MP
15952015-05-07 Marek Polacek <polacek@redhat.com>
1596
1597 PR c/65179
1598 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1599 value.
1600
9babc352
MP
16012015-04-30 Marek Polacek <polacek@redhat.com>
1602
1603 * c-typeck.c (set_init_label): Call error_at instead of error and
1604 pass LOC to it.
1605
ac9f18db
MP
1606 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1607 the type of a decl.
1608
ec3fba51
MP
1609 * c-typeck.c (c_build_va_arg): Clarify the error message.
1610
b811915d
TS
16112015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1612
1613 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1614 OMP_STANDALONE_CLAUSES.
1615
f3075008
MP
16162015-04-28 Marek Polacek <polacek@redhat.com>
1617
1618 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1619
4e81b788
MP
16202015-04-28 Marek Polacek <polacek@redhat.com>
1621
1622 PR c/65901
1623 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1624
6c1db78e
MP
16252015-04-25 Marek Polacek <polacek@redhat.com>
1626
1627 PR c/52085
1628 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1629 attribute.
1630
5c4abbb8
MP
16312015-04-23 Marek Polacek <polacek@redhat.com>
1632
1633 PR c/65345
1634 * c-decl.c (set_labels_context_r): New function.
1635 (store_parm_decls): Call it via walk_tree_without_duplicates.
1636 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1637 instead of create_tmp_var. Build TARGET_EXPR instead of
1638 COMPOUND_EXPR.
1639 (build_atomic_assign): Use create_tmp_var_raw instead of
1640 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1641
06aca1d5
IV
16422015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1643
1644 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1645 (c_parser_omp_target_update): Add missed %> to error_at ().
1646
8fba1830
BRF
16472015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1648
1649 PR target/55143
1650 * c-decl.c (c_default_pointer_mode): Remove definition.
1651 * c-tree.h (c_default_pointer_mode): Remove declaration.
1652
62021f64
TB
16532015-03-27 Tobias Burnus <burnus@net-b.de>
1654
1655 PR c/65586
1656 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1657 error out.
1658 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1659 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1660 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1661
9b65e171
JJ
16622015-03-19 Jakub Jelinek <jakub@redhat.com>
1663
1664 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1665 attribute for DECL_EXTERNAL VAR_DECLs.
1666
17958621
JJ
16672015-03-11 Jakub Jelinek <jakub@redhat.com>
1668
1669 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1670 argument.
1671
7ccb1a11
JJ
16722015-03-10 Jakub Jelinek <jakub@redhat.com>
1673
1674 PR c/65120
1675 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1676 before preparing arguments to warn_logical_not_parentheses.
1677
01177669
JJ
16782015-03-09 Jakub Jelinek <jakub@redhat.com>
1679
1680 PR c/65120
1681 * c-typeck.c (parser_build_binary_op): Don't warn for
1682 !!x == y or !b == y where b is _Bool.
1683
802ac282
MP
16842015-03-09 Marek Polacek <polacek@redhat.com>
1685
1686 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1687 * c-decl.c (grokdeclarator): Likewise.
1688 * c-typeck.c (build_binary_op): Likewise.
1689
e5165b60
MP
16902015-02-27 Marek Polacek <polacek@redhat.com>
1691
1692 PR c/65228
1693 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1694
065d214c
MP
16952015-02-14 Marek Polacek <polacek@redhat.com>
1696
1697 PR c/64768
1698 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1699 declared through a typedef name.
1700
e5d9235b
MP
17012015-02-13 Marek Polacek <polacek@redhat.com>
1702
1703 PR c/65050
1704 * c-decl.c (grokdeclarator): Print also the type when giving
1705 the error message about array's incomplete element type.
1706
fa01ffcc
JJ
17072015-02-11 Jakub Jelinek <jakub@redhat.com>
1708
1709 PR c/64824
1710 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1711 check in the POP macro.
1712
c3e38a03
MP
17132015-02-09 Marek Polacek <polacek@redhat.com>
1714
1715 PR c/64856
1716 * c-typeck.c (process_init_element): Don't always wrap
1717 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1718 initializing a range of elements.
1719
4886ec8e
JJ
17202015-02-04 Jakub Jelinek <jakub@redhat.com>
1721
1722 PR c/64824
1723 PR c/64868
1724 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1725
c3e38a03 17262015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1727
1728 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1729 processing enum declaration.
1730
7b33f0c8
MP
17312015-01-29 Marek Polacek <polacek@redhat.com>
1732
1733 PR c/64709
1734 * c-typeck.c (pop_init_level): If constructor_elements has
1735 exactly one element with integer_zerop value, set constructor_zeroinit
1736 to 1. Remove braces around warning_init call.
1737
dea63e49
JJ
17382015-01-27 Jakub Jelinek <jakub@redhat.com>
1739
1740 PR c/64766
1741 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1742 of FUNCTION_DECLs with error_mark_node.
1743
d38f7dce
JJ
17442015-01-26 Jakub Jelinek <jakub@redhat.com>
1745
1746 PR c/64778
1747 * c-typeck.c (convert_arguments): Return -1 if there are
1748 error_args, even if we've diagnosed too many arguments.
1749
cbf5d0e7
RB
17502015-01-21 Richard Biener <rguenther@suse.de>
1751
1752 PR middle-end/64313
1753 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1754 for builtins the user declared correctly.
1755
41dbbb37
TS
17562015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1757 Bernd Schmidt <bernds@codesourcery.com>
1758 Cesar Philippidis <cesar@codesourcery.com>
1759 James Norris <jnorris@codesourcery.com>
1760 Jakub Jelinek <jakub@redhat.com>
1761 Ilmir Usmanov <i.usmanov@samsung.com>
1762
1763 * c-parser.c: Include "gomp-constants.h".
1764 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1765 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1766 Use OMP_CLAUSE_SET_MAP_KIND.
1767 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1768 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1769 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1770 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1771 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1772 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1773 "copyout", "create", "delete", "deviceptr", "gang", "host",
1774 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1775 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1776 "present_or_create", "pcreate", "seq", "self", "vector",
1777 "vector_length", "wait", "worker".
1778 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1779 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1780 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1781 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1782 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1783 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1784 (c_parser_oacc_data_clause_deviceptr)
1785 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1786 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1787 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1788 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1789 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1790 (c_parser_oacc_parallel, c_parser_oacc_update)
1791 (c_parser_oacc_wait): New functions.
1792 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1793 (c_finish_oacc_data): New prototypes.
1794 * c-typeck.c: Include "gomp-constants.h".
1795 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1796 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1797 OMP_CLAUSE_SET_MAP_KIND.
1798 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1799 (c_finish_oacc_data): New functions.
1800 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1801 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1802 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1803 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1804 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1805 GOMP_MAP_FORCE_DEVICEPTR.
1806
adfac8df
JJ
18072015-01-09 Michael Collison <michael.collison@linaro.org>
1808
1809 * c-array-notation.c: Include hash-set.h, machmode.h,
1810 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1811 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1812 * c-aux-info.c: Ditto.
1813 * c-convert.c: Ditto.
1814 * c-decl.c: Ditto.
1815 * c-errors.c: Ditto.
1816 * c-lang.c: Dittoxs.
1817 * c-objc-common.c: Ditto.
1818 * c-parser.c: Ditto.
1819 * c-typeck.c: Include hash-set.h, machmode.h,
1820 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1821 fold-const.h, wide-int.h, inchash.h, real.h and
1822 fixed-value.h due to flattening of tree.h.
1823
2cc901dc
MP
18242015-01-07 Marek Polacek <polacek@redhat.com>
1825
1826 PR c/64417
1827 * c-typeck.c (process_init_element): Disallow initialization of
1828 a flexible array member with a string constant if the structure
1829 is in an array.
1830
5624e564
JJ
18312015-01-05 Jakub Jelinek <jakub@redhat.com>
1832
e5341100
JJ
1833 PR sanitizer/64344
1834 * c-typeck.c (convert_for_assignment, c_finish_return): For
1835 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1836 types also set in_late_binary_op around convert call.
1837 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1838 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1839 result on expr as last argument to ubsan_instrument_float_cast,
1840 if in_late_binary_op, don't use c_save_expr but save_expr.
1841
5624e564
JJ
1842 Update copyright years.
1843
5bd012f8
MP
18442015-01-05 Marek Polacek <polacek@redhat.com>
1845
1846 PR c/64423
1847 * c-typeck.c (build_array_ref): Pass loc down to
1848 warn_array_subscript_with_type_char.
1849
768952be
MU
18502014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1851
1852 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1853 (common-pointer-type): For pointers to arrays take qualifiers from
1854 element type.
1855 (build_conditional_expr): Add warnings for lost qualifiers.
1856 (comp-target-types): Allow pointers to arrays with different qualifiers.
1857 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1858 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1859 to PEDWARN_FOR_QUALIFIERS.
1860
8f94a8c4
JJ
18612014-12-17 Jakub Jelinek <jakub@redhat.com>
1862
1863 PR sanitizer/64289
1864 * c-convert.c: Include ubsan.h.
1865 (convert): For real -> integral casts and
1866 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1867 instead instrument the float cast directly.
1868
b731b390
JJ
18692014-11-29 Jakub Jelinek <jakub@redhat.com>
1870
1871 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1872 c_finish_stmt_expr): Remove NULL last argument from
1873 create_tmp_var_raw and create_tmp_var calls.
1874 * c-array-notation.c (fix_builtin_array_notation_fn,
1875 build_array_notation_expr, fix_conditional_array_notations_1,
1876 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1877
541e35a6
MP
18782014-11-28 Marek Polacek <polacek@redhat.com>
1879
1880 PR c/63862
1881 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1882 convert the right operand to integer type.
1883
b286be94
MP
18842014-11-25 Marek Polacek <polacek@redhat.com>
1885
1886 PR c/63877
1887 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1888 for inline functions.
1889
aa7da51a
JJ
18902014-11-21 Jakub Jelinek <jakub@redhat.com>
1891
1892 PR target/63764
1893 * c-typeck.c (build_array_ref): Adjust
1894 convert_vector_to_pointer_for_subscript caller. If it returns true,
1895 call non_lvalue_loc on the result.
1896
d876207f
RB
18972014-11-11 Richard Biener <rguenther@suse.de>
1898
1899 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1900 to true.
1901
e5e44252
AK
19022014-11-10 Andi Kleen <ak@linux.intel.com>
1903
1904 PR c/60804
1905 * c-parser.c (c_parser_statement_after_labels): Call
1906 check_no_cilk.
1907 (c_parser_if_statement): Dito.
1908 (c_parser_switch_statement): Dito.
1909 (c_parser_while_statement): Dito.
1910 (c_parser_do_statement): Dito.
1911 (c_parser_for_statement): Dito.
1912 * c-typeck.c (c_finish_loop): Dito.
1913
13c21655
PC
19142014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1915
1916 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1917 OPT_Wshift_count_overflow in the warnings.
1918
2d51fcef
MP
19192014-10-30 Marek Polacek <polacek@redhat.com>
1920
1921 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1922 print the stripped version as well, if they're not the same.
1923
ef4bddc2
RS
19242014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1925
1926 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1927 machine_mode.
1928
c582198b
AM
19292014-10-28 Andrew MacLeod <amacleod@redhat.com>
1930
1931 * c-decl.c: Adjust include files.
1932 * c-parser.c: Ditto.
1933
ddc8de03
PM
19342014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1935 Tom Tromey <tromey@redhat.com>
1936
1937 * c-tree.h (enum c_oracle_request): New.
1938 (c_binding_oracle_function): New typedef.
1939 (c_binding_oracle, c_pushtag, c_bind): Declare.
1940 * c-decl.c (c_binding_oracle): New global.
1941 (I_SYMBOL_CHECKED): New macro.
1942 (i_symbol_binding): New function.
1943 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1944 (I_TAG_CHECKED): New macro.
1945 (i_tag_binding): New function.
1946 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1947 (I_LABEL_CHECKED): New macro.
1948 (i_label_binding): New function.
1949 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1950 (c_print_identifier): Save and restore c_binding_oracle.
1951 (c_pushtag, c_bind): New functions.
1952
60393bbc
AM
19532014-10-27 Andrew MacLeod <amacleod@redhat.com>
1954
1955 * c-typeck.c: Adjust include files.
1956
d723bb7c
MLI
19572014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1958
1959 PR c++/53061
1960 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1961 initialization here...
1962 (c_initialize_diagnostics): ... but here. Set defaults after
1963 building pretty-printer.
1964
1bc5a451
MP
19652014-10-23 Marek Polacek <polacek@redhat.com>
1966
1967 PR c/63626
1968 * c-decl.c (pop_scope): Don't print warning in external_scope.
1969
4435bb92
MP
19702014-10-19 Marek Polacek <polacek@redhat.com>
1971
1972 PR c/63567
1973 * c-typeck.c (output_init_element): Allow initializing objects with
1974 static storage duration with compound literals even in C99 and add
1975 pedwarn for it.
1976
7278465e
MP
19772014-10-17 Marek Polacek <polacek@redhat.com>
1978
1979 PR c/63567
1980 * c-typeck.c (digest_init): Allow initializing objects with static
1981 storage duration with compound literals even in C99 and add pedwarn
1982 for it.
1983
d9b7be2e
MP
19842014-10-17 Marek Polacek <polacek@redhat.com>
1985
1986 PR c/63543
1987 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1988 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1989 error multiple times. Print the type.
1990
f406ae1f
MP
19912014-10-17 Marek Polacek <polacek@redhat.com>
1992
1993 PR c/63549
1994 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1995 type.
1996
92574c7c
MP
19972014-10-17 Marek Polacek <polacek@redhat.com>
1998
1999 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2000 (start_function): Use OPT_Wimplicit_int instead of 0.
2001 (store_parm_decls_oldstyle): Likewise.
2002
1bc4a978
MT
20032014-10-17 Alan Modra <amodra@gmail.com>
2004
2005 PR middle-end/61848
2006 * c-decl.c (merge_decls): Don't merge section name or tls model
2007 to newdecl symtab node, instead merge to olddecl. Override
2008 existing olddecl section name. Set tls_model for all thread-local
2009 vars, not just OMP thread-private ones. Remove incorrect comment.
2010
83685514
AM
20112014-10-16 Andrew MacLeod <amacleod@redhat.com>
2012
2013 * c-decl.c: Adjust include files.
2014
78a7c317
DD
20152014-10-14 DJ Delorie <dj@redhat.com>
2016
2017 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2018 (c_token_starts_typename): Check all __intN, not just __int128.
2019 (c_token_starts_declspecs): Likewise.
2020 (c_parser_declspecs): Likewise.
2021 (c_parser_attribute_any_word): Likewise.
2022 (c_parser_objc_selector): Likewise.
2023 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2024 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2025 is specified.
2026 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2027 __int128.
2028 (finish_declspecs): Likewise.
2029
74d98c1e
AB
20302014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2031
2032 * c-parser.c (c_parser_all_labels): New function to replace
2033 the duplicate code.
2034 (c_parser_statement): Call the new function.
2035
84937de2
MP
20362014-10-09 Marek Polacek <polacek@redhat.com>
2037
2038 PR c/63480
2039 * c-typeck.c (pop_init_level): Don't warn about initializing
2040 with { }.
2041
0382aaa0
MP
20422014-10-07 Marek Polacek <polacek@redhat.com>
2043
2044 PR c/59717
2045 * c-decl.c (header_for_builtin_fn): New function.
2046 (implicitly_declare): Suggest which header to include.
2047
7a0ca710
MP
20482014-10-07 Marek Polacek <polacek@redhat.com>
2049
2050 * c-convert.c (convert): Use error_operand_p.
2051 * c-typeck.c (require_complete_type): Likewise.
2052 (really_atomic_lvalue): Likewise.
2053 (digest_init): Likewise.
2054 (handle_omp_array_sections_1): Likewise.
2055
6bc8a126
MP
20562014-10-03 Marek Polacek <polacek@redhat.com>
2057
2058 PR c/63453
2059 * c-decl.c (pop_scope): Don't warn about "inline function declared
2060 but never defined" for functions marked with gnu_inline attribute.
2061
d90c0a59
JJ
20622014-09-25 Jakub Jelinek <jakub@redhat.com>
2063
2064 PR c++/63249
2065 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2066 on low_bound and length.
2067
083e891e
MP
20682014-09-24 Marek Polacek <polacek@redhat.com>
2069
2070 PR c/61405
2071 PR c/53874
2072 * c-parser.c: Don't define CPP_KEYWORD.
2073 (c_parser_switch_statement): Pass original type to c_finish_case.
2074 * c-tree.h (c_finish_case): Update declaration.
2075 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2076 conditionally to c_do_switch_warnings.
2077
8d95fe25
MP
20782014-09-03 Marek Polacek <polacek@redhat.com>
2079
2080 PR c/62024
2081 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2082 conversions.
2083
9a771876
JJ
20842014-09-02 Jakub Jelinek <jakub@redhat.com>
2085 Balaji V. Iyer <balaji.v.iyer@intel.com>
2086 Igor Zamyatin <igor.zamyatin@intel.com>
2087
2088 * c-parser.c (c_parser_cilk_for): New function.
2089 (c_parser_cilk_grainsize): Likewise.
2090 (c_get_temp_regvar): Likewise.
2091 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2092 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2093 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2094 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2095 case.
2096
b7679d96
CG
20972014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2098
2099 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2100 with using HOST_WIDE_INT without truncation to 'int'
2101
59ea0364
MP
21022014-08-22 Marek Polacek <polacek@redhat.com>
2103
2104 PR c++/62199
2105 * c-typeck.c (parser_build_binary_op): Adjust call to
2106 warn_logical_not_parentheses.
2107
671a475e
IZ
21082014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2109
2110 PR other/62008
2111 * c-parser.c (c_parser_array_notation): Check for correct
2112 type of an array added.
2113
04159acf
MP
21142014-08-19 Marek Polacek <polacek@redhat.com>
2115
2116 PR c++/62153
2117 * c-typeck.c (build_binary_op): If either operand of a comparison
2118 is a boolean expression, call maybe_warn_bool_compare.
2119
c77935ee
PP
21202014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2121
2122 PR c/45584
2123 * c-typeck.c (build_c_cast): Do a conversion even when the
2124 TYPE_MAIN_VARIANTs are the same.
2125
35aff4fb
MP
21262014-08-19 Marek Polacek <polacek@redhat.com>
2127
2128 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2129 pedwarn_c99 instead of pedwarn.
2130 (grokfield): Likewise.
2131 (warn_defaults_to): New function.
2132 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2133 Unconditionally call pedwarn_c99 instead of pedwarn.
2134 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2135 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2136 check flag_isoc11 before.
2137 * c-errors.c (pedwarn_c99): Change the return type to bool.
2138 Handle -Wc99-c11-compat.
2139 * c-parser.c (disable_extension_diagnostics): Handle
2140 warn_c99_c11_compat.
2141 (restore_extension_diagnostics): Likewise.
2142 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2143 instead of pedwarn, don't check flag_isoc11 before.
2144 (c_parser_declspecs): Likewise.
2145 (c_parser_alignas_specifier): Likewise.
2146 (c_parser_alignof_expression): Likewise.
2147 (c_parser_generic_selection): Likewise.
2148 * c-tree.h (pedwarn_c99): Update declaration.
2149 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2150 of pedwarn_c99.
2151
177cce46
MP
21522014-08-19 Marek Polacek <polacek@redhat.com>
2153
2154 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2155 to pedwarn_c90.
2156 * c-errors.c: Include "opts.h".
2157 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2158 * c-parser.c (disable_extension_diagnostics): Handle negative value
2159 of warn_c90_c99_compat, too.
2160 (restore_extension_diagnostics): Likewise.
2161 (c_parser_compound_statement_nostart): Pass
2162 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2163
6dc99c33
MP
21642014-08-12 Marek Polacek <polacek@redhat.com>
2165
2166 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2167 Add pedwarn.
2168 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2169 Likewise.
2170 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2171
f3bede71
MP
21722014-08-10 Marek Polacek <polacek@redhat.com>
2173
2174 PR c/51849
2175 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2176 Call pedwarn_c90 instead of pedwarn.
2177 (check_bitfield_type_and_width): Likewise.
2178 (declspecs_add_qual): Likewise.
2179 (declspecs_add_type): Likewise.
2180 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2181 Adjust to only call pedwarn_c90.
2182 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2183 pedwarn_c90 instead of pedwarn.
2184 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2185 * c-parser.c (disable_extension_diagnostics): Handle
2186 warn_c90_c99_compat.
2187 (restore_extension_diagnostics): Likewise.
2188 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2189 pedwarn_c90 instead of pedwarn.
2190 (c_parser_initelt): Likewise.
2191 (c_parser_postfix_expression): Likewise.
2192 (c_parser_postfix_expression_after_paren_type): Likewise.
2193 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2194 * c-tree.h: Fix formatting.
2195 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2196 pedwarn_c90 instead of pedwarn.
2197
9f25a338
TS
21982014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2199
2200 * c-typeck.c: Remove include of pointer-set.h.
2201
044331a8
MP
22022014-08-07 Marek Polacek <polacek@redhat.com>
2203
2204 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2205
b787e7a2
TS
22062014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2207
2208 * c-typeck.c: Use hash_map instead of pointer_map.
2209
6e2830c3
TS
22102014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2211
2212 * c-decl.c: Use hash_set instead of pointer_set.
2213
a7ee52fb
IZ
22142014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2215
2216 PR middle-end/61455
2217 * c-array-notation.c (expand_array_notations): Handling
2218 of DECL_EXPR added.
2219
b4dfdc11
MG
22202014-07-31 Marc Glisse <marc.glisse@inria.fr>
2221
2222 PR c++/60517
2223 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2224 a local variable.
2225
976d5a22
TT
22262014-07-30 Tom Tromey <tromey@redhat.com>
2227
2228 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2229 field.
2230 (really_start_incremental_init, push_init_level): Initialize
2231 designator_depth.
2232 (pop_init_level): Set global designator_depth.
2233 (process_init_element): Check for designated_init attribute.
2234
30281de2
MP
22352014-07-20 Marek Polacek <polacek@redhat.com>
2236
2237 PR c/61852
2238 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2239 (implicitly_declare): Pass location to implicit_decl_warning.
2240
b108f48f
JJ
22412014-07-14 Jakub Jelinek <jakub@redhat.com>
2242
2243 PR middle-end/61294
2244 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2245 If non-NULL, call c_parser_check_literal_zero.
2246 (c_parser_check_literal_zero): New function.
2247 (c_parser_postfix_expression_after_primary): Adjust
2248 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2249
773ec47f
MP
22502014-07-06 Marek Polacek <polacek@redhat.com>
2251
2252 PR c/6940
2253 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2254 * c-tree.h (C_ARRAY_PARAMETER): Define.
2255 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2256 function parameter.
2257
22e1cf1c
JH
22582014-07-02 Jan Hubicka <hubicka@ucw.cz>
2259 Chen Gang <gang.chen.5i5j@gmail.com>
2260
2261 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2262 releasing symbol.
2263
52ec0ea3
MP
22642014-07-01 Marek Polacek <polacek@redhat.com>
2265
2266 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2267 instead of 0 to WARN_FOR_ASSIGNMENT.
2268
d5c3d343
MP
22692014-07-01 Marek Polacek <polacek@redhat.com>
2270
2271 PR c/58286
2272 * c-typeck.c (convert_for_assignment): Pass
2273 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2274
6a7253a4
MP
22752014-06-30 Marek Polacek <polacek@redhat.com>
2276
2277 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2278 has no_sanitize_undefined attribute.
2279
5e88a8f4
IZ
22802014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2281
2282 PR middle-end/57541
2283 * c-array-notation.c (fix_builtin_array_notation_fn):
2284 Check for 0 arguments in builtin call. Check that bultin argument is
2285 correct.
2286 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2287 index.
2288
9698b078
SH
22892014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2290
2291 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2292 qualifiers in __auto_type for atomic types.
2293 (c_parser_typeof_specifier): Discard all type qualifiers in
2294 __typeof__ for atomic types.
2295
6e07c515
MP
22962014-06-25 Marek Polacek <polacek@redhat.com>
2297
2298 PR c/61162
2299 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2300 the return expression to c_finish_return.
2301
da6f124d
JJ
23022014-06-25 Jakub Jelinek <jakub@redhat.com>
2303
2304 * c-typeck.c (c_finish_omp_clauses): Make sure
2305 OMP_CLAUSE_LINEAR_STEP has correct type.
2306
c203e8a7
TS
23072014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2308
2309 * c-decl.c: Adjust.
2310
56ad0e38
JJ
23112014-06-24 Jakub Jelinek <jakub@redhat.com>
2312
2313 * c-parser.c (c_parser_omp_for_loop): For
2314 #pragma omp parallel for simd move lastprivate clause from parallel
2315 to for rather than simd.
2316
47c2554f
MP
23172014-06-23 Marek Polacek <polacek@redhat.com>
2318
2319 * c-typeck.c (parser_build_binary_op): Don't call
2320 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2321
56363ffd
JH
23222014-06-15 Jan Hubicka <hubicka@ucw.cz>
2323
2324 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2325 * c-decl.c (merge_decls): Likewise.
2326
d7ff7ae5
MP
23272014-06-09 Marek Polacek <polacek@redhat.com>
2328
2329 PR c/36446
2330 * c-typeck.c (error_init): Call inform instead of error_at.
2331 (pedwarn_init): Call inform instead of pedwarn.
2332 (warning_init): Call inform instead of warning_at.
2333
24d047a3
JH
23342014-06-07 Jan Hubicka <hubicka@ucw.cz>
2335
2336 * c-decl.c (merge_decls): Use set_decl_section_name.
2337 (duplicate_decls): Remove node if it exists.
2338
9bac5cbb
G
23392014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2340
2341 PR c/53119
2342 * c-typeck.c (push_init_level, process_init_element,
2343 pop_init_level): Correct check for zero initialization, move
2344 missing brace warning to respect zero initialization.
2345
8ffcdea8
MP
23462014-06-05 Marek Polacek <polacek@redhat.com>
2347
2348 PR c/56724
2349 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2350
742938c9
MP
23512014-06-05 Marek Polacek <polacek@redhat.com>
2352
2353 PR c/49706
2354 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2355 on the left hand side operand of a comparison.
2356
6447c55d
MP
23572014-06-05 Marek Polacek <polacek@redhat.com>
2358
2359 PR c/48062
2360 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2361 Print note only if the warning was printed.
2362
9dc7743c
IZ
23632014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2364
2365 PR c/58942
2366 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2367 with a pointer.
2368
fedfecef
MP
23692014-06-03 Marek Polacek <polacek@redhat.com>
2370
2371 PR c/60439
2372 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2373 c_start_case.
2374 * c-tree.h (c_start_case): Update.
2375 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2376 switch condition has boolean value.
2377
9b2b7279
AM
23782014-06-02 Andrew MacLeod <amacleod@redhat.com>
2379
2380 * c-decl.c: Include builtins.h.
2381 * c-parser.c: Likewise.
2382
5c1bc275
MP
23832014-05-27 Marek Polacek <polacek@redhat.com>
2384
2385 PR c/56724
2386 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2387 error and warning calls to error_at and warning_at. Pass location of
2388 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2389 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2390 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2391
97563bc8
IZ
23922014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2393
2394 PR c/61191
2395 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2396 function parameters.
2397
aede2c10
JH
23982014-05-23 Jan Hubicka <hubicka@ucw.cz>
2399
2400 * c-decl.c (merge_decls): Preserve symtab node pointers.
2401 (duplicate_decls): Free new decl.
2402
edbba2ce
TS
24032014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2404
f3316c6d
TS
2405 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2406 initialization.
2407
edbba2ce
TS
2408 * c-parser.c (c_parser_omp_target): Return bool values.
2409
68c81f24
TS
24102014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2411
2412 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2413 num_teams_loc variable to num_thread_limit_loc.
2414
632f2871
RS
24152014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2416
2417 * c-array-notation.c (expand_array_notations): Use void_node
2418 instead of void_zero_node.
2419
766090c2
TS
24202014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2421
2422 * c-decl.c (finish_struct): Adjust.
2423 (finish_enum): Likewise.
2424 (bind): Adjust.
2425 (record_inline_static): Likewise.
2426 (push_scope): Likewise.
2427 (make_label): Likewise.
2428 (lookup_label_for_goto): Likewise.
2429 (finish_struct): Likewise.
2430 (finish_enum): Likewise.
2431 (store_parm_decls): Likewise.
2432 (c_push_function_context): Likewise.
2433 * c-lang.h: Remove usage of variable_size gty attribute.
2434 * c-parser.c (c_parse_init): Adjust.
2435 (c_parse_file): Likewise.
2436
2b107f6b
MP
24372014-05-13 Marek Polacek <polacek@redhat.com>
2438
2439 PR c/61162
2440 * c-typeck.c (convert_for_assignment): Pass location to
2441 WARN_FOR_ASSIGNMENT instead of input_location.
2442
d033409e
MP
24432014-05-10 Marek Polacek <polacek@redhat.com>
2444
2445 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2446 maybe_warn_string_init.
2447 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2448 maybe_warn_string_init.
2449 * c-tree.h (maybe_warn_string_init): Update declaration.
2450 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2451 Call pedwarn_init with loc instead of with input_location.
2452 (digest_init): Pass init_loc to maybe_warn_string_init.
2453 (pop_init_level): Call pedwarn_init with loc instead of with
2454 input_location.
2455 (set_init_index): Likewise.
2456 (process_init_element): Likewise.
2457
ea58ef42
MP
24582014-05-09 Marek Polacek <polacek@redhat.com>
2459
2460 PR c/61096
2461 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2462 (c_parser_initelt): Pass location to set_init_label. Pass array index
2463 location to set_init_index.
2464 * c-tree.h (push_init_level): Update declaration.
2465 (pop_init_level): Likewise.
2466 (set_init_index): Likewise.
2467 (set_init_label): Likewise.
2468 * c-typeck.c (error_init): Add location parameter. Call error_at
2469 instead of error.
2470 (digest_init): Pass init_loc to error_init.
2471 (really_start_incremental_init):
2472 (push_init_level): Add location parameter. Pass loc to pop_init_level
2473 and error_init.
2474 (pop_init_level): Likewise.
2475 (set_designator): Add location parameter. Pass loc to pop_init_level,
2476 push_init_level, and error_init.
2477 (set_init_index): Add location parameter. Pass loc to error_init and
2478 set_designator.
2479 (set_init_label): Likewise.
2480 (output_init_element): Pass loc to error_init.
2481 (process_init_element): Pass loc to error_init, pop_init_level,
2482 pedwarn_init, and push_init_level.
2483
661a0813
MP
24842014-05-09 Marek Polacek <polacek@redhat.com>
2485
2486 PR c/50459
2487 * c-parser.c (c_parser_attributes): Parse the arguments as an
2488 expression-list if the attribute takes identifier.
2489
2793eeab
MP
24902014-05-08 Marek Polacek <polacek@redhat.com>
2491
2492 PR c/61053
2493 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2494 TYPE_ALIGN_UNIT.
2495
f827930a
MP
24962014-05-08 Marek Polacek <polacek@redhat.com>
2497
2498 PR c/61077
2499 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2500 of main.
2501
1d60af08
KZ
25022014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2503 Mike Stump <mikestump@comcast.net>
2504 Richard Sandiford <rdsandiford@googlemail.com>
2505
2506 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2507 (finish_enum): Use wide-int interfaces.
2508 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2509 * c-typeck.c (build_c_cast): Likewise.
2510 (set_nonincremental_init_from_string): Likewise.
2511 (c_tree_equal): Likewise.
2512
a0e24419
MP
25132014-05-02 Marek Polacek <polacek@redhat.com>
2514
2515 PR c/25801
2516 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2517 Return size_one_node when the type is not complete.
2518 (pointer_diff): Remove comment.
2519 (build_unary_op): Improve error messages.
2520
19fc9faa
MP
25212014-05-02 Marek Polacek <polacek@redhat.com>
2522
2523 * c-typeck.c (c_finish_return): Separate warning_at calls.
2524
63bc4e87
MP
25252014-05-02 Marek Polacek <polacek@redhat.com>
2526
2527 * c-tree.h (error_init): Remove declaration.
2528 (pedwarn_init): Likewise.
2529 * c-typeck.c (error_init): Make static and move above.
2530 (pedwarn_init): Likewise.
2531 (warning_init): Move above.
2532 (maybe_warn_string_init): Likewise.
2533
4bd2511b
JL
25342014-05-01 Jeff Law <law@redhat.com>
2535
2536 Revert:
2537
2538 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2539 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2540 avoid goto.
2541
6a358dcb
MP
25422014-05-02 Marek Polacek <polacek@redhat.com>
2543
2544 PR c/60784
2545 * c-typeck.c (push_init_level): Set constructor_designated to
2546 p->designated for structures.
2547
ae5ebda4
MP
25482014-05-01 Marek Polacek <polacek@redhat.com>
2549
2550 PR c/60915
2551 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2552 function-definition has an attribute after the declarator.
2553
96b40f8d
MP
25542014-05-01 Marek Polacek <polacek@redhat.com>
2555
2556 PR c/60257
2557 * c-typeck.c (warning_init): Add location_t parameter. Call
2558 warning_at instead of warning.
2559 (push_init_level): Pass input_location to warning_init.
2560 (add_pending_init): Add location_t parameter. Pass loc to
2561 warning_init.
2562 (set_nonincremental_init): Pass input_location to add_pending_init.
2563 (set_nonincremental_init_from_string): Likewise.
2564 (output_init_element): Pass loc to warning_init and to
2565 add_pending_init.
2566
32e00768
MP
25672014-05-01 Marek Polacek <polacek@redhat.com>
2568
2569 PR c/43395
2570 * c-typeck.c (c_finish_return): Distinguish between label and variable
2571 when warning about returning local address.
2572
c9379ce2
MP
25732014-05-01 Marek Polacek <polacek@redhat.com>
2574
2575 PR c/29467
2576 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2577 in C89 mode.
2578
d00887e8
MP
25792014-05-01 Marek Polacek <polacek@redhat.com>
2580
2581 PR c/43245
2582 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2583 instead of 0 to WARN_FOR_QUALIFIERS.
2584
5436fa2e
MP
25852014-05-01 Marek Polacek <polacek@redhat.com>
2586
2587 PR c/56989
2588 * c-typeck.c (default_conversion): Use better location for
2589 error call.
2590
f8ed5150
MP
25912014-04-30 Marek Polacek <polacek@redhat.com>
2592
2593 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2594 also when SANITIZE_FLOAT_DIVIDE is on.
2595
8337d1db
MP
25962014-04-30 Marek Polacek <polacek@redhat.com>
2597
2598 PR c/60139
2599 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2600 and pedwarn_init. Use loc insted of input_location.
2601
c4bdc42f
MP
26022014-04-30 Marek Polacek <polacek@redhat.com>
2603
2604 PR c/60351
2605 * c-typeck.c (build_binary_op): Use location when warning about
2606 shift count.
2607
45484dcf
MP
26082014-04-25 Marek Polacek <polacek@redhat.com>
2609
2610 PR c/18079
2611 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2612 always_inline/noinline and hot/cold attributes.
2613
34cf811f
MP
26142014-04-25 Marek Polacek <polacek@redhat.com>
2615
2616 PR c/60114
2617 * c-parser.c (c_parser_initelt): Pass input_location to
2618 process_init_element.
2619 (c_parser_initval): Pass loc to process_init_element.
2620 * c-tree.h (process_init_element): Adjust declaration.
2621 * c-typeck.c (push_init_level): Pass input_location to
2622 process_init_element.
2623 (pop_init_level): Likewise.
2624 (set_designator): Likewise.
2625 (output_init_element): Add location_t parameter. Pass loc to
2626 digest_init.
2627 (output_pending_init_elements): Pass input_location to
2628 output_init_element.
2629 (process_init_element): Add location_t parameter. Pass loc to
2630 output_init_element.
2631
42056eac
JJ
26322014-04-24 Jakub Jelinek <jakub@redhat.com>
2633
2634 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2635 atomic-clause, allow comma in between atomic-clause and
2636 seq_cst.
2637
e162a134
JJ
26382014-04-22 Jakub Jelinek <jakub@redhat.com>
2639
2640 PR c/59073
2641 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2642 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2643
2f6babac
IZ
26442014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2645
2646 PR middle-end/60469
2647 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2648 create_tmp_var instead build_decl for creating temps.
2649 (build_array_notation_expr): Likewise.
2650 (fix_conditional_array_notations_1): Likewise.
2651 (fix_array_notation_expr): Likewise.
2652 (fix_array_notation_call_expr): Likewise.
2653
8edbfaa6
JJ
26542014-03-28 Jakub Jelinek <jakub@redhat.com>
2655
2656 PR c++/60689
2657 * c-tree.h (c_build_function_call_vec): New prototype.
2658 * c-typeck.c (build_function_call_vec): Don't call
2659 resolve_overloaded_builtin here.
2660 (c_build_function_call_vec): New wrapper function around
2661 build_function_call_vec. Call resolve_overloaded_builtin here.
2662 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2663 Call c_build_function_call_vec instead of build_function_call_vec.
2664 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2665 * c-decl.c (finish_decl): Likewise.
2666
7485aeea
MLI
26672014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2668
2669 PR c/55383
2670 * c-typeck.c: Use correct format string in cast-qual warning
2671
b17a8b07
TS
26722014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2673
2674 * c-decl.c (c_decl_attributes): Use
2675 lang_hooks.types.omp_mappable_type.
2676 * c-typeck.c (c_finish_omp_clauses): Likewise.
2677
3af9c5e9
MP
26782014-03-06 Marek Polacek <polacek@redhat.com>
2679
2680 PR c/60197
2681 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2682 of checking tree code.
2683
1c9f5f33
PK
26842014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2685
2686 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2687 (c_parser_parameter_declaration): Likewise.
2688
cc28fc7f
MP
26892014-02-19 Marek Polacek <polacek@redhat.com>
2690
2691 PR c/60195
2692 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2693 Call mark_exp_read on exp.value.
2694 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2695 TREE_ADDRESSABLE on old instead of val.
2696 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2697
b581c05c
PK
26982014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2699
2700 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2701 C_EXPR_APPEND by vec_safe_push.
2702 * c-tree.h (C_EXPR_APPEND): Remove.
2703
81e5eca8
MP
27042014-01-31 Marek Polacek <polacek@redhat.com>
2705
2706 PR c/59963
2707 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2708 build_function_call_vec.
2709 (build_function_call): Likewise.
2710 (build_atomic_assign): Likewise.
2711 (build_function_call_vec): Add arg_loc parameter. Use it.
2712 (convert_arguments): Likewise.
2713 (convert_for_assignment): Rename rhs_loc to expr_loc.
2714 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2715 (c_parser_objc_keywordexpr): Likewise.
2716 (c_parser_postfix_expression_after_primary): Call
2717 build_function_call_vec with expr_loc rather than op_loc.
2718 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2719 build_function_call_vec.
2720 (c_parser_expr_list): Add locations parameter. Fill it with locations
2721 of function arguments.
2722 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2723
68fca595
MP
27242014-01-30 Marek Polacek <polacek@redhat.com>
2725
2726 PR c/59940
2727 * c-typeck.c (build_function_call_vec): Use loc parameter.
2728 (convert_arguments): Add location parameter. Use it.
2729 (ep_convert_and_check): Likewise.
2730 (build_atomic_assign): Adjust convert_for_assignment call.
2731 (build_modify_expr): Likewise.
2732 (digest_init): Likewise.
2733 (c_finish_return): Likewise.
2734 (build_conditional_expr): Adjust ep_convert_and_check calls.
2735 (convert_for_assignment): Add rhs_loc parameter. Use it.
2736 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2737 calls.
2738
fa337f3a
RB
27392014-01-30 Richard Biener <rguenther@suse.de>
2740
2741 PR c/59905
2742 * c-typeck.c (build_function_call_vec): Do not replace calls
2743 to a function via an incompatible type with a runtime abort.
2744
b72271b9
BI
27452014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2746
2747 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2748 flag_enable_cilkplus with flag_cilkplus.
2749 (c_parser_direct_declarator_inner): Likewise.
2750 (c_parser_attribute_any_word): Likewise.
2751 (c_parser_attributes): Likewise.
2752 (c_parser_compound_statement): Likewise.
2753 (c_parser_statement_after_labels): Likewise.
2754 (c_parser_if_statement): Likewise.
2755 (c_parser_switch_statement): Likewise.
2756 (c_parser_do_statement): Likewise.
2757 (c_parser_for_statement): Likewise.
2758 (c_parser_unary_expression): Likewise.
2759 (c_parser_postfix_expression): Likewise.
2760 (c_parser_postfix_expression_after_primary): Likewise.
2761 (c_parser_postfix_expression_after_primary): Likewise.
2762 (c_parser_omp_clause_name): Likewise.
2763 (c_finish_omp_declare_simd): Likewise.
2764 (c_parser_cilk_verify_simd): Likewise.
2765 * c-typeck.c (build_array_ref): Likewise.
2766 (build_function_call_vec): Likewise.
2767 (convert_arguments): Likewise.
2768 (build_compound_expr): Likewise.
2769 (c_finish_return): Likewise.
2770 (c_finish_if_stmt): Likewise.
2771 (c_finish_loop): Likewise.
2772 (build_binary_op): Likewise.
2773
393e8e8b
MP
27742014-01-23 Marek Polacek <polacek@redhat.com>
2775
2776 PR c/59846
2777 * c-typeck.c (parser_build_binary_op): Use location instead of
2778 input_location.
2779 (build_binary_op): Pass location to shorten_compare.
2780
f04dda30
MP
27812014-01-23 Marek Polacek <polacek@redhat.com>
2782
2783 PR c/58346
2784 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2785 an empty aggregate.
2786
789eadcd
MP
27872014-01-23 Marek Polacek <polacek@redhat.com>
2788
2789 PR c/59871
2790 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2791 of a comma expression.
2792 (emit_side_effect_warnings): Likewise.
2793
40f14e9f
BI
27942014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2795
2796 PR c/59825
2797 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2798 function to use walk_tree and moved a lot of its functionality to
2799 expand_array_notations.
2800 (expand_array_notations): New function.
2801
74558dd9
BI
28022014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2803
2804 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2805 attribute an attribute without value.
2806
652fea39
JJ
28072014-01-23 Jakub Jelinek <jakub@redhat.com>
2808
2809 PR middle-end/58809
2810 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2811 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2812
f34f1c87
MP
28132014-01-22 Marek Polacek <polacek@redhat.com>
2814
2815 PR c/59891
2816 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2817 of remove_c_maybe_const_expr on op1 and op2.
2818
241f845a
JJ
28192014-01-15 Jakub Jelinek <jakub@redhat.com>
2820
2821 PR c/58943
2822 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2823 effects, preevaluate rhs using SAVE_EXPR first.
2824
9a74f20c
BI
28252014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2826
2827 PR c++/59631
2828 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2829 statements with if-elseif statements.
2830
96066ce1
MP
28312014-01-06 Marek Polacek <polacek@redhat.com>
2832
2833 PR c/57773
2834 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2835 defined bit-field types only in ISO C.
2836
23a5b65a
RS
28372014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2838
2839 Update copyright years
2840
f9030485
RS
28412014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2842
2843 * c-array-notation.c: Use the standard form for the copyright notice.
2844
41958c28
BI
28452013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2846
2847 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2848 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2849 field in parser is not empty. If not-empty, call the function
2850 c_parser_finish_omp_declare_simd.
2851 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2852 between SIMD-enabled functions and #pragma simd. Added new parameter.
2853 (c_parser_cilk_all_clauses): Modified the usage of the function
2854 c_parser_cilk_clause_vectorlength as mentioned above.
2855 (c_parser_cilk_simd_fn_vector_attrs): New function.
2856 (c_finish_cilk_simd_fn_tokens): Likewise.
2857 (is_cilkplus_vector_p): Likewise.
2858 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2859 "nomask," and "mask" strings in clause name.
2860 (c_parser_omp_all_clauses): Added 3 new case statements:
2861 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2862 PRAGMA_CILK_CLAUSE_NOMASK.
2863 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2864 check for vector attribute and if so call the function
2865 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2866 called the function c_finish_cilk_simd_fn_tokens.
2867 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2868 parser field is non-empty. If so, parse them as you would parse
2869 the omp declare simd pragma.
2870 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2871 Added a check when step is a parameter and flag it as error.
2872 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2873 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2874 pragma_omp_clause.
2875
cef0fd0e
TS
28762013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2877
2878 * c-parser.c (c_parser_omp_parallel): Fix description.
2879
12893402
BI
28802013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2881
2882 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2883 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2884 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2885 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2886
296674db
JM
28872013-12-04 Joseph Myers <joseph@codesourcery.com>
2888
2889 PR c/52023
2890 * c-parser.c (c_parser_alignas_specifier): Use
2891 c_sizeof_or_alignof_type instead of c_alignof.
2892 (c_parser_alignof_expression): Likewise, with min_alignof
2893 parameter depending on alignof spelling used.
2894
edd28054
MP
28952013-12-04 Marek Polacek <polacek@redhat.com>
2896
2897 PR c/54113
2898 * c-decl.c (start_function): Don't warn for missing prototype for
2899 inline functions.
2900
da0fc454
MP
29012013-12-03 Marek Polacek <polacek@redhat.com>
2902
2903 PR c/59351
2904 * c-decl.c (build_compound_literal): Allow compound literals with
2905 empty initial value.
2906
4c2ecab0
JM
29072013-12-02 Joseph Myers <joseph@codesourcery.com>
2908
2909 PR c/58235
2910 * c-typeck.c (build_modify_expr): Diagnose assignment to
2911 expression with array type.
2912
340baef7
JM
29132013-11-29 Joseph Myers <joseph@codesourcery.com>
2914
2915 PR c/42262
2916 * c-typeck.c (process_init_element): Do not treat a string as
2917 initializing a whole array when used with a designator for an
2918 individual element.
2919
6763b9f7
JM
29202013-11-29 Joseph Myers <joseph@codesourcery.com>
2921
2922 PR c/57574
2923 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2924 an inline function following a static declaration.
2925
e7bd1de1
JJ
29262013-11-28 Jakub Jelinek <jakub@redhat.com>
2927
2928 PR c/59310
2929 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2930 to p_name before calling c_parser_omp_teams instead of after.
2931 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2932 argument. Remove unused p_name variable.
2933
0136f8f0
AH
29342013-11-27 Aldy Hernandez <aldyh@redhat.com>
2935 Jakub Jelinek <jakub@redhat.com>
2936
2937 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2938 external_scope is NULL.
2939
241b71bb
TV
29402013-11-27 Tom de Vries <tom@codesourcery.com>
2941 Marc Glisse <marc.glisse@inria.fr>
2942
2943 PR c++/59032
2944 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2945
2fb9a547
AM
29462013-11-22 Andrew MacLeod <amacleod@redhat.com>
2947
2948 * c-typeck.c: Add required include files from gimple.h.
2949
8400e75e
DM
29502013-11-22 David Malcolm <dmalcolm@redhat.com>
2951
2952 * c-decl.c (define_label, shadow_tag_warned)
2953 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2954 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2955 (declspecs_add_type): Remove use of in_system_header macro.
2956 * c-parser.c (c_parser_unary_expression): Likewise.
2957 * c-typeck.c (store_init_value, process_init_element)
2958 (c_start_case): Likewise.
2959
2960 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2961 macro.
2962
2963 * c-parser.c (c_parser_set_source_position_from_token): Remove
2964 reference to in_system_header from comment.
2965
386b1f1f
RS
29662013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2967
2968 * c-decl.c (grokdeclarator): Update comment to refer to
2969 tree_to_[su]hwi rather than tree_low_cst.
2970
ae7e9ddd
RS
29712013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2972
2973 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2974 tree_to_uhwi throughout.
2975
9439e9a1
RS
29762013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2977
2978 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2979 throughout.
2980
9541ffee
RS
29812013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2982
2983 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2984 throughout.
2985
c02065fc
AH
29862013-11-15 Aldy Hernandez <aldyh@redhat.com>
2987
2988 * c-parser.c (c_parser_cilk_simd): New.
2989 (c_parser_cilk_verify_simd): New.
2990 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2991 (c_parser_omp_for_loop): Add case for NE_EXPR.
2992 Set c_break_label for CILK_SIMD.
2993 (c_parser_cilk_clause_vectorlength): New.
2994 (c_parser_cilk_clause_linear): New.
2995 (c_parser_cilk_clause_name): New.
2996 (c_parser_cilk_all_clauses): New.
2997 * c-typeck.c (build_unary_op): Pass location argument to
2998 readonly_error.
2999 (build_modify_expr): Same.
3000 (build_asm_expr): Same.
3001 (c_finish_bc_stmt): Error on break/continue in loops.
3002
18f429e2
AM
30032013-11-14 Andrew MacLeod <amacleod@redhat.com>
3004
3005 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3006
d8a2d370
DN
30072013-11-14 Diego Novillo <dnovillo@google.com>
3008
3009 * c-decl.c: Include print-tree.h.
3010 Include stor-layout.h.
3011 Include varasm.h.
3012 Include attribs.h.
3013 Include stringpool.h.
3014 * c-lang.c: Include fold-const.h.
3015 * c-parser.c: Include stringpool.h.
3016 Include attribs.h.
3017 Include stor-layout.h.
3018 Include varasm.h.
3019 Include trans-mem.h.
3020 * c-typeck.c: Include stor-layout.h.
3021 Include trans-mem.h.
3022 Include varasm.h.
3023 Include stmt.h.
3024
38b7bc7f
JM
30252013-11-13 Joseph Myers <joseph@codesourcery.com>
3026
3027 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3028 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3029 __auto_type.
3030 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3031 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3032 RID_AUTO_TYPE.
3033 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3034 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3035 (c_parser_declarator, c_parser_direct_declarator_inner)
3036 (c_parser_parameter_declaration, c_parser_type_name): All callers
3037 changed.
3038 (c_parser_declaration_or_fndef): Handle declarations with type
3039 determined from the initializer.
3040
45b0be94
AM
30412013-11-12 Andrew MacLeod <amacleod@redhat.com>
3042
18f429e2 3043 * c-typeck.c: Include gimplify.h.
45b0be94 3044
582d9b50
JM
30452013-11-12 Joseph Myers <joseph@codesourcery.com>
3046
3047 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3048 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3049 comment.
3050 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3051 or _Thread_local as appropriate in diagnostics.
3052 (build_null_declspecs): Initialize ret->thread_gnu_p.
3053 (declspecs_add_scspec): Handle either __thread or _Thread_local
3054 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3055 pedantic. Do not disallow _Thread_local extern and _Thread_local
3056 static.
3057
267bac10
JM
30582013-11-07 Joseph Myers <joseph@codesourcery.com>
3059 Andrew MacLeod <amacleod@redhat.com>
3060
3061 * c-aux-info.c (gen_type): Handle atomic qualifier.
3062 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3063 qualifiers when compating types.
3064 (shadow_tag_warned): Handle atomic_p in declspecs.
3065 (quals_from_declspecs): Likewise.
3066 (start_decl): Use c_type_promotes_to when promoting argument
3067 types.
3068 (grokdeclarator): Handle _Atomic.
3069 (get_parm_info): Diagnose any qualifier on "void" as only
3070 parameter.
3071 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3072 comparing types. Use c_type_promotes_to when promoting argument
3073 types.
3074 (finish_function): Use c_type_promotes_to when promoting argument
3075 types.
3076 (build_null_declspecs): Handle atomic_p in declspecs.
3077 (declspecs_add_qual): Handle RID_ATOMIC.
3078 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3079 (c_token_starts_declspecs): Handle RID_ATOMIC.
3080 (c_parser_declspecs): Handle atomic type specifiers and
3081 qualifiers.
3082 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3083 from types of expressions with atomic type.
3084 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3085 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3086 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3087 (c_parser_statement_after_labels, c_parser_switch_statement)
3088 (c_parser_for_statement, c_parser_expr_no_commas)
3089 (c_parser_conditional_expression, c_parser_binary_expression)
3090 (c_parser_cast_expression, c_parser_unary_expression)
3091 (c_parser_postfix_expression)
3092 (c_parser_postfix_expression_after_primary, c_parser_expression):
3093 Use convert_lvalue_to_rvalue.
3094 (c_parser_expression_conv, c_parser_expr_list): Document
3095 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3096 (c_parser_objc_synchronized_statement): Use
3097 convert_lvalue_to_rvalue.
3098 (c_parser_objc_selector): Handle RID_ATOMIC.
3099 (c_parser_objc_receiver, c_parser_array_notation): Use
3100 convert_lvalue_to_rvalue.
3101 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3102 _Atomic (type-name).
3103 (struct c_declspecs): Add atomic_p field.
3104 (convert_lvalue_to_rvalue): Declare.
3105 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3106 corresponding atomic types.
3107 (qualify_type): Don't add _Atomic qualifiers from second argument.
3108 (comp_target_types): Do not allow _Atomic mismatches.
3109 (type_lists_compatible_p): Do not remove atomic qualifiers when
3110 comparing types.
3111 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3112 (build_atomic_assign): New functions.
3113 (build_unary_op): Use build_atomic_assign for atomic increment and
3114 decrement.
3115 (build_conditional_expr): Do not treat _Atomic void as a qualified
3116 version of void.
3117 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3118 (find_anonymous_field_with_type, convert_to_anonymous_field)
3119 (convert_for_assignment): Do not remove atomic qualifiers when
3120 comparing types.
3121 (digest_init): Do not accept initialization of arrays of atomic
3122 elements by string constants.
3123 (build_asm_expr): Use convert_lvalue_to_rvalue.
3124 (build_binary_op): Do not treat _Atomic void as a qualified
3125 version of void.
3126
0c249d4b
DD
31272013-11-06 DJ Delorie <dj@redhat.com>
3128
3129 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3130 both explicit and builtin, print the location of the explicit one.
3131
6d7f7e0a
TB
31322013-11-05 Tobias Burnus <burnus@net-b.de>
3133
3134 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3135 c_parser_omp_distribute, c_parser_omp_teams,
3136 c_parser_omp_target, c_parser_omp_declare): Handle
3137 -fopenmp-simd.
3138
b906f4ca
MP
31392013-11-03 Marek Polacek <polacek@redhat.com>
3140
3141 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3142
ee1d5a02
JJ
31432013-11-01 Jakub Jelinek <jakub@redhat.com>
3144
3145 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3146 check_dup_generic at the end, unless remove is true.
3147 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3148 remove = true;.
3149 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3150
5a9785fb
JJ
31512013-10-31 Jakub Jelinek <jakub@redhat.com>
3152
3153 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3154 with decl that is not pointer nor array.
3155
939b37da
BI
31562013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3157
3158 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3159 a spawning function is found.
3160 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3161 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3162 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3163 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3164 case.
3165 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3166 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3167 expr.
3168 (c_finish_return): Added a check to reject _Cilk_spawn in return
3169 expression.
3170 (build_cilk_spawn): New function.
3171 (build_cilk_sync): Likewise.
3172 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3173
d4af74d4
TB
31742013-10-27 Tobias Burnus <burnus@net-b.de>
3175
3176 PR other/33426
3177 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3178 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3179 (c_parser_statement_after_labels): Update calls.
3180
d73749df 31812013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3182
3183 PR other/33426
3184 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3185 Handle PRAGMA_IVDEP.
3186 (c_parser_statement_after_labels): Update call.
3187
f28aa681
MP
31882013-10-24 Marek Polacek <polacek@redhat.com>
3189
3190 * c-parser.c (c_parser_struct_declaration): Add a comment.
3191 (c_parser_declarator): Don't allow _Alignas here.
3192
0645c1a2
AM
31932013-10-17 Andrew MacLeod <amacleod@redhat.com>
3194
3195 * c-parser.c: Include omp-low.h.
3196 * c-typeck.c: Likewise.
3197
568a31f2
MP
31982013-10-17 Marek Polacek <polacek@redhat.com>
3199
3200 PR c/58267
3201 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3202 Document syntax of the array-declarator.
3203 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3204 are not permitted.
3205 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3206 (c_parser_struct_declaration): Likewise.
3207 (c_parser_declarator): Likewise.
3208 (c_parser_direct_declarator_inner): Likewise.
3209 (c_parser_parameter_declaration): Likewise.
3210 (c_parser_type_name): Likewise.
3211
acf0174b
JJ
32122013-10-11 Jakub Jelinek <jakub@redhat.com>
3213
3214 * c-lang.h (current_omp_declare_target_attribute): New extern
3215 decl.
3216 * c-parser.c: Include c-lang.h.
3217 (struct c_parser): Change tokens to c_token *.
3218 Add tokens_buf field. Change tokens_avail type to unsigned int.
3219 (c_parser_consume_token): If parser->tokens isn't
3220 &parser->tokens_buf[0], increment parser->tokens.
3221 (c_parser_consume_pragma): Likewise.
3222 (enum pragma_context): Add pragma_struct and pragma_param.
3223 (c_parser_external_declaration): Adjust
3224 c_parser_declaration_or_fndef caller.
3225 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3226 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3227 Adjust recursive call.
3228 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3229 of pragma_external.
3230 (c_parser_parameter_declaration): Use pragma_param instead of
3231 pragma_external.
3232 (c_parser_compound_statement_nostart, c_parser_label,
3233 c_parser_for_statement): Adjust
3234 c_parser_declaration_or_fndef callers.
3235 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3236 it through to c_parser_conditional_expression.
3237 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3238 pass it through to c_parser_binary_expression. Adjust recursive
3239 call.
3240 (c_parser_binary_expression): Remove prec argument, add
3241 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3242 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3243 binop matches it, use build2 instead of parser_build_binary_op.
3244 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3245 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3246 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3247 Handle pragma_struct and pragma_param the same as pragma_external.
3248 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3249 (c_parser_omp_variable_list): Parse array sections for
3250 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3251 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3252 (c_parser_omp_clause_reduction): Handle user defined reductions.
3253 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3254 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3255 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3256 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3257 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3258 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3259 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3260 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3261 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3262 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3263 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3264 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3265 (c_parser_omp_for_loop): Add CODE argument, pass it through
3266 to c_finish_omp_for. Change last argument to cclauses,
3267 and adjust uses to grab parallel clauses from the array of all
3268 the split clauses. Adjust c_parser_binary_expression,
3269 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3270 (omp_split_clauses): New function.
3271 (c_parser_omp_simd): New function.
3272 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3273 Allow the function to be called also when parsing combined constructs,
3274 and call c_parser_omp_simd when parsing for simd.
3275 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3276 #pragma omp section, require exactly one structured-block instead of
3277 sequence of statements.
3278 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3279 Allow the function to be called also when parsing combined constructs.
3280 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3281 Allow the function to be called also when parsing combined
3282 constructs.
3283 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3284 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3285 c_parser_omp_teams, c_parser_omp_target_data,
3286 c_parser_omp_target_update, c_parser_omp_target,
3287 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3288 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3289 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3290 (c_parser_omp_construct): Add p_name and mask vars. Handle
3291 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3292 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3293 and c_parser_omp_sections callers.
3294 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3295 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3296 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3297 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3298 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3299 OMP_CLAUSE_DEPEND.
3300 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3301 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3302 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3303 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3304 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3305 * c-typeck.c: Include tree-inline.h.
3306 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3307 handle_omp_array_sections_1, handle_omp_array_sections,
3308 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3309 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3310 user defined reductions.
3311 (c_tree_equal): New function.
3312 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3313 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3314 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3315 c_check_omp_declare_reduction_r): New prototypes.
3316 * c-decl.c (current_omp_declare_target_attribute): New variable.
3317 (c_decl_attributes): New function.
3318 (start_decl, start_function): Use it instead of decl_attributes.
3319 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3320 c_omp_reduction_decl, c_omp_reduction_lookup,
3321 c_check_omp_declare_reduction_r): New functions.
3322
0a6c2227
TT
33232013-09-25 Tom Tromey <tromey@redhat.com>
3324
3325 * Make-lang.in (c/gccspec.o): Remove.
3326 (CFLAGS-c/gccspec.o): New variable.
3327 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3328 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3329 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3330
f3bc55f0
TT
33312013-09-25 Tom Tromey <tromey@redhat.com>
3332
3333 * Make-lang.in (c/gccspec.o): Don't use subshell.
3334
a24d975c
MP
33352013-09-18 Marek Polacek <polacek@redhat.com>
3336
3337 PR sanitize/58443
3338 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3339 Remove unnecessary check.
3340
ce6923c5
MP
33412013-09-18 Marek Polacek <polacek@redhat.com>
3342
3343 PR sanitizer/58411
3344 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3345 no_sanitize_undefined attribute.
3346
a1e51df9
KT
33472013-09-13 Kai Tietz <ktietz@redhat.com>
3348
3349 PR target/57848
3350 * c-decl.c (c_builtin_function_ext_scope): Remove
3351 wrong assumption that it is never called on prexisting
3352 symbol.
3353
0af94e6f
JR
33542013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3355
3356 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3357
20059c8b
GDR
33582013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3359
3360 * c-objc-common.c (c_tree_printer): Tidy.
3361
de5a5fa1
MP
33622013-08-30 Marek Polacek <polacek@redhat.com>
3363
3364 * c-typeck.c (build_binary_op): Add division by zero and shift
3365 instrumentation.
3366
2531a1d9 33672013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3368 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3369
6e2bcc98 3370 PR c/35649
2531a1d9
JR
3371 * c-typeck.c (c_common_type): Prefer double_type_node over
3372 other REAL_TYPE types with the same precision.
3373 (convert_arguments): Likewise.
3374
025311c4
GDR
33752013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3376
3377 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3378 (c_initialize_diagnostics): Call a destructor for the early printer.
3379
da6ca2b5
GDR
33802013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3381
3382 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3383 printer initialization.
3384
318cda85 33852013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3386
318cda85
BI
3387 PR c/57490
3388 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3389 check for truth values.
3390 (expand_array_notation_exprs): Added truth values case. Removed an
3391 unwanted else. Added for-loop to walk through subtrees in default
3392 case.
3393
b066401f
GDR
33942013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3395
3396 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3397
fb48aadc
JM
33982013-07-23 Joseph Myers <joseph@codesourcery.com>
3399
3400 * c-parser.c (struct c_generic_association): Fix typo.
3401
433cc7b0
TT
34022013-07-23 Tom Tromey <tromey@redhat.com>
3403 Joseph Myers <joseph@codesourcery.com>
3404
3405 * c-parser.c (struct c_generic_association): New.
3406 (c_generic_association_d): New typedef.
3407 (c_parser_generic_selection): New function.
3408 (c_parser_postfix_expression): Handle RID_GENERIC.
3409
26d40c3d
JM
34102013-07-13 Jason Merrill <jason@redhat.com>
3411
3412 PR c++/57793
3413 * c-decl.c (finish_struct): Check for too-large class.
3414
ecdbd01a 34152013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3416
3417 PR c/57821
3418 * c-typeck.c (set_init_index): When folding, check for index overflow.
3419
1141ed3f
BI
34202013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3421
3422 * c-parser.c (c_parser_array_notation): Removed rejection of array
3423 notations in an array of function pointers.
3424
713b46fa
BI
34252013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3426
3427 * c-array-notation.c (make_triplet_val_inv): New function.
3428 (create_cmp_incr): Likewise.
3429 (create_array_refs): Likewise.
3430 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3431 Also modularized common parts between functions and called the function.
3432 (build_array_notation_expr): Likewise.
3433 (fix_conditional_array_notations_1): Likewise.
3434 (fix_array_notation_expr): Likewise.
3435 (fix_array_notation_call_expr): Likewise.
3436
92f20202
MP
34372013-06-18 Marek Polacek <polacek@redhat.com>
3438
3439 PR c/57630
3440 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3441
73a23b06
BI
34422013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3443
3444 * c-array-notation.c (build_array_notation_expr): Reject array notation
3445 mismatch between LHS and RHS even inside a call_expr. Also, removed
3446 a couple while statements that were dead code.
3447
00b8517d
BI
34482013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3449
3450 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3451 excessive precision expressions in function parameters. Also removed
3452 couple unwanted while statements.
3453
1509bdda
BI
34542013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3455
3456 * c-array-notation.c (expand_array_notation_exprs): Added
3457 ARRAY_NOTATION_REF case.
3458
d60f1706
BI
34592013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3460
3461 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3462 function to c-family/array-notation-common.c.
3463 (is_cilkplus_reduce_builtin): Likewise.
3464 (find_rank): Likewise.
3465 (extract_array_notation_exprs): Likewise.
3466 (replace_array_notations): Likewise.
3467 (find_inv_trees): Likewise.
3468 (replace_inv_trees): Likewise.
3469 (contains_array_notation_expr): Likewise.
3470 (find_correct_array_notation_type): Likewise.
3471 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3472 (struct inv_list): Moved this to c-family/array-notation-common.c.
3473 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3474
6d6efbb3
BI
34752013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3476
3477 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3478 reduction functions outside the for-loop. Added a check if the fundecl
3479 is non-NULL. Finally, removed an unwanted if-statement, and made the
3480 body unconditional.
3481
25c22937
BI
34822013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3483
3484 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3485 condition of the if-statement matches the rank of else-block and then-
3486 block when array notations are used.
3487 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3488 expression after the entire function body is parsed.
3489 (c_parser_expr_no_commas): Delayed creating array notation expressions
3490 to the end of function parsing.
3491 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3492 whole if-statement instead of just the condition.
3493 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3494
edd25645
BI
34952013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3496
3497 PR c/57474
3498 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3499 array to NULL_TREE if they are unused. Also added a check for the
3500 field to be NULL before its fields are used in future.
3501
065ce7f1
RO
35022013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3503
3504 PR bootstrap/57450
3505 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3506 (build_array_notation_expr): Likewise.
3507
36536d79
BI
35082013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3509
3510 * c-typeck.c (build_array_ref): Added a check to see if array's
3511 index is greater than one. If true, then emit an error.
3512 (build_function_call_vec): Exclude error reporting and checking
3513 for builtin array-notation functions.
3514 (convert_arguments): Likewise.
3515 (c_finish_return): Added a check for array notations as a return
3516 expression. If true, then emit an error.
3517 (c_finish_loop): Added a check for array notations in a loop
3518 condition. If true then emit an error.
3519 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3520 (build_binary_op): Added a check for array notation expr inside
3521 op1 and op0. If present, we call another function to find correct
3522 type.
3523 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3524 * c-parser.c (c_parser_compound_statement): Check if array
3525 notation code is used in tree, if so, then transform them into
3526 appropriate C code.
3527 (c_parser_expr_no_commas): Check if array notation is used in LHS
3528 or RHS, if so, then build array notation expression instead of
3529 regular modify.
3530 (c_parser_postfix_expression_after_primary): Added a check for
3531 colon(s) after square braces, if so then handle it like an array
3532 notation. Also, break up array notations in unary op if found.
3533 (c_parser_direct_declarator_inner): Added a check for array
3534 notation.
3535 (c_parser_compound_statement): Added a check for array notation in
3536 a stmt. If one is present, then expand array notation expr.
3537 (c_parser_if_statement): Likewise.
3538 (c_parser_switch_statement): Added a check for array notations in
3539 a switch statement's condition. If true, then output an error.
3540 (c_parser_while_statement): Similarly, but for a while.
3541 (c_parser_do_statement): Similarly, but for a do-while.
3542 (c_parser_for_statement): Similarly, but for a for-loop.
3543 (c_parser_unary_expression): Check if array notation is used in a
3544 pre-increment or pre-decrement expression. If true, then expand
3545 them.
3546 (c_parser_array_notation): New function.
3547 * c-array-notation.c: New file.
3548 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3549
cd192ccc
MS
35502013-05-23 Mike Stump <mikestump@comcast.net>
3551
3552 * c-typeck.c (convert_for_assignment): Handle references to memory
3553 spaces better.
3554
427b248d
JM
35552013-05-16 Jason Merrill <jason@redhat.com>
3556
3557 * Make-lang.in (cc1$(exeext)): Use link mutex.
3558
44d90fe1
PC
35592013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3560
3561 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3562 to simply use OPT_Wpointer_arith.
3563 (build_unary_op): Likewise.
3564
4e7d7b3d
JJ
35652013-04-03 Jakub Jelinek <jakub@redhat.com>
3566
3567 PR c/19449
3568 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3569 argument. If set, or it temporarily for parsing of the first
3570 argument into force_folding_builtin_constant_p.
3571 (c_parser_postfix_expression): Adjust callers.
3572
839b422f
RB
35732013-03-21 Richard Biener <rguenther@suse.de>
3574
3575 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3576 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3577
2ee028f1
MP
35782013-02-12 Marek Polacek <polacek@redhat.com>
3579
3580 PR c/44938
3581 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3582 origtypes to NULL.
3583
8824edff
JJ
35842013-01-24 Jakub Jelinek <jakub@redhat.com>
3585
3586 PR c/56078
3587 * c-typeck.c (set_nonincremental_init_from_string): If
3588 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3589 returned false.
3590 (process_init_element): Likewise.
3591
eadd3d0d
JJ
35922012-12-20 Jakub Jelinek <jakub@redhat.com>
3593
3594 PR c++/55619
3595 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3596 argument, don't call default_function_array_conversion
3597 nor c_fully_fold here.
3598 (c_parser_asm_statement): Adjust callers.
3599 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3600 and outputs here, and call default_function_array_conversion
3601 on inputs that don't need to be addressable.
3602
f8a93a2e
JJ
36032012-12-18 Jakub Jelinek <jakub@redhat.com>
3604
3605 PR c/39464
3606 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3607 warning require that both c_common_unsigned_type as well as
3608 c_common_signed_type is the same for both mvl and mvr types.
3609
9771b263
DN
36102012-11-16 Diego Novillo <dnovillo@google.com>
3611
3612 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3613
3614 * c-common.c: Use new vec API in vec.h.
3615 * c-common.h: Likewise.
3616 * c-gimplify.c: Likewise.
3617 * c-pragma.c: Likewise.
3618 * c-pretty-print.c: Likewise.
3619 * c-pretty-print.h: Likewise.
3620 * c-semantics.c: Likewise.
3621 * c-decl.c: Likewise.
3622 * c-parser.c: Likewise.
3623 * c-tree.h: Likewise.
3624 * c-typeck.c: Likewise.
3625
880661a4
JW
36262012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3627
3628 PR c++/54930
3629 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3630
077d1abe
MLI
36312012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3632
3633 PR c/53066
3634 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3635 shadows a function, unless the variable is a function or a
3636 pointer-to-function.
3637
3a785c97
JJ
36382012-10-12 Jakub Jelinek <jakub@redhat.com>
3639
3640 PR c/54381
3641 * c-parser.c (struct c_tree_loc_pair): Removed.
3642 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3643 add location_t * and tree * arguments, fill in array of 3
3644 sizeof_arg trees and corresponding locs.
3645 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3646 c_parser_expr_list callers.
3647 (c_parser_postfix_expression_after_primary): Likewise. Pass
3648 array of 3 sizeof_arg trees and locs (corresponding to first
3649 3 arguments) to sizeof_pointer_memaccess_warning.
3650
703c8606
LC
36512012-10-09 Lawrence Crowl <crowl@google.com>
3652
3653 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3654 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3655 hash table.
3656
5d9de0d0
PC
36572012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3658
3659 PR c++/54194
3660 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3661 call.
3662
a212e43f
MG
36632012-10-09 Marc Glisse <marc.glisse@inria.fr>
3664
3665 PR c++/54427
3666 * c-typeck.c: Include c-common.h.
3667 (enum stv_conv): Moved to c-common.h.
3668 (scalar_to_vector): Moved to c-common.c.
3669 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3670 * Make-lang.in: c-typeck.c depends on c-common.h.
3671
3b78de56
AC
36722012-10-04 Arnaud Charlet <charlet@adacore.com>
3673
3674 * c-decl.c (c_write_global_declarations): Fix handling of
3675 -fdump-ada-spec*.
3676
78c60e3d
SS
36772012-09-30 Sharad Singhai <singhai@google.com>
3678
3679 * c-decl.c (c_write_global_declarations): Use a different method
3680 to determine if the dump has ben initialized.
3681
9f33203d
JM
36822012-09-14 Joseph Myers <joseph@codesourcery.com>
3683
3684 PR c/54552
3685 * c-typeck.c (c_cast_expr): When casting to a type requiring
3686 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3687 c_fully_fold first.
3688
a27d595d
JM
36892012-09-14 Joseph Myers <joseph@codesourcery.com>
3690
3691 PR c/54103
3692 * c-typeck.c (build_unary_op): Pass original argument of
3693 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3694 any C_MAYBE_CONST_EXPR, if it has integer operands.
3695 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3696 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3697 to c_objc_common_truthvalue_conversion, then remove any
3698 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3699 c_objc_common_truthvalue_conversion not
3700 c_common_truthvalue_conversion.
3701 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3702 call note_integer_operands for arguments with integer operands
3703 that are not integer constants.
3704
9feb29df
JJ
37052012-09-13 Jakub Jelinek <jakub@redhat.com>
3706
3707 PR c/54559
3708 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3709 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3710
d409320c
JJ
37112012-08-31 Jakub Jelinek <jakub@redhat.com>
3712
3713 PR c/54428
3714 * c-convert.c (convert): Don't call fold_convert_loc if
3715 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3716 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3717 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3718
6265d07c
JJ
37192012-08-24 Jakub Jelinek <jakub@redhat.com>
3720
3721 PR c/54355
3722 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3723 for nested and empty_ok arguments in the call to
3724 c_parser_declaration_or_fndef.
3725
1a4049e7
JJ
37262012-08-17 Jakub Jelinek <jakub@redhat.com>
3727
3728 * c-tree.h (c_last_sizeof_arg): Declare.
3729 * c-parser.c (struct c_tree_loc_pair): New type.
3730 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3731 non-NULL.
3732 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3733 (c_parser_postfix_expression_after_primary): Likewise. Call
3734 sizeof_pointer_memaccess_warning if needed.
3735 (sizeof_ptr_memacc_comptypes): New function.
3736 * c-typeck.c (c_last_sizeof_arg): New global variable.
3737 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3738
0229aee9
UB
37392012-07-24 Uros Bizjak <ubizjak@gmail.com>
3740
3741 * c-lang.h (lang_decl): Add variable_size GTY option.
3742
7ee2468b
SB
37432012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3744
3745 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3746 * Make-lang.in: Fix dependencies.
3747
d4a10d0a
SB
37482012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3749
3750 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3751 and add language Makefile hooks.
3752 * config-lang.in: New file.
3753 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3754 add the required "normal" config-lang.in rules.
3755 * c-lang.h: Moved from gcc/ to here.
3756 * c-tree.h: Likewise.
3757 * c-objc-common.c: Likewise.
3758 * c-objc-common.h: Likewise.
3759 * c-typeck.c: Likewise.
3760 * c-convert.c: Likewise.
3761 * c-lang.c: Likewise.
3762 * c-aux-info.c: Likewise.
3763 * c-errors.c: Likewise.
3764 * gccspec.c: Likewise.
3765 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3766 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3767\f
818ab71a 3768Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3769
3770Copying and distribution of this file, with or without modification,
3771are permitted in any medium without royalty provided the copyright
3772notice and this notice are preserved.